Spaces:
Runtime error
Runtime error
Download htmlTemplates.py from gli-mrunal/GPT_instruct_chatbot: direct link, hf CLI and curl.
- Browser
- Download file 993 Bytes
-
https://huggingface.co/spaces/gli-mrunal/GPT_instruct_chatbot/resolve/0cbc4e27e3c8dfbcfa632b16563e2ef935d9a739/htmlTemplates.py
- Command line
-
hf download hf://spaces/gli-mrunal/GPT_instruct_chatbot@0cbc4e27e3c8dfbcfa632b16563e2ef935d9a739/htmlTemplates.py
-
curl -L -o htmlTemplates.py https://huggingface.co/spaces/gli-mrunal/GPT_instruct_chatbot/resolve/0cbc4e27e3c8dfbcfa632b16563e2ef935d9a739/htmlTemplates.py
993 Bytes
| css = ''' | |
| <style> | |
| .chat-message { | |
| padding: 1.5rem; border-radius: 0.5rem; margin-bottom: 1rem; display: flex | |
| } | |
| .chat-message.user { | |
| background-color: #2b313e | |
| } | |
| .chat-message.bot { | |
| background-color: #475063 | |
| } | |
| .chat-message .avatar { | |
| width: 20%; | |
| } | |
| .chat-message .avatar img { | |
| max-width: 78px; | |
| max-height: 78px; | |
| border-radius: 50%; | |
| object-fit: cover; | |
| } | |
| .chat-message .message { | |
| width: 80%; | |
| padding: 0 1.5rem; | |
| color: #fff; | |
| } | |
| ''' | |
| bot_template = ''' | |
| <div class="chat-message bot"> | |
| <div class="avatar"> | |
| <img src="https://github.com/gli-mrunal/test_images/blob/main/gpt.jpg?raw=true" style="max-height: 78px; max-width: 78px; border-radius: 50%; object-fit: cover;"> | |
| </div> | |
| <div class="message">{{MSG}}</div> | |
| </div> | |
| ''' | |
| user_template = ''' | |
| <div class="chat-message user"> | |
| <div class="avatar"> | |
| <img src="https://github.com/gli-mrunal/test_images/blob/main/user.png?raw=true"> | |
| </div> | |
| <div class="message">{{MSG}}</div> | |
| </div> | |
| ''' |