Spaces:
Build error
Build error
Download htmlTemplates.py from galaxyweblinks/llmaidemo: direct link, hf CLI and curl.
- Browser
- Download file 784 Bytes
-
https://huggingface.co/spaces/galaxyweblinks/llmaidemo/resolve/main/htmlTemplates.py
- Command line
-
hf download hf://spaces/galaxyweblinks/llmaidemo/htmlTemplates.py
-
curl -L -o htmlTemplates.py https://huggingface.co/spaces/galaxyweblinks/llmaidemo/resolve/main/htmlTemplates.py
784 Bytes
| css = ''' | |
| <style> | |
| .chat-message { | |
| padding: 1.5rem; border-radius: 0.5rem; margin-bottom: 1rem; display: flex | |
| } | |
| .chat-message.user { | |
| background-color: #e7f8ff; | |
| float: right; | |
| } | |
| .chat-message.bot { | |
| background-color: #f2f2f2; | |
| float: left; | |
| } | |
| .chat-message .avatar { | |
| width: 20%; | |
| } | |
| .chat-message .avatar img { | |
| max-width: 78px; | |
| max-height: 78px; | |
| border-radius: 50%; | |
| object-fit: cover; | |
| } | |
| .chat-message .message { | |
| color: #000; | |
| } | |
| .stMarkdown { | |
| width:auto !important; | |
| } | |
| ''' | |
| bot_template = ''' | |
| <div class="chat-message bot"> | |
| <div class="message">{{MSG}}</div> | |
| </div> | |
| ''' | |
| user_template = ''' | |
| <div class="chat-message user"> | |
| <div class="message">{{MSG}}</div> | |
| </div> | |
| ''' | |
| img_template = ''' | |
| <div class=""> | |
| <img src="{{MSG}}" width="200"/> | |
| </div> | |
| ''' |