Spaces:
Sleeping
Sleeping
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://is1-ssl.mzstatic.com/image/thumb/Purple116/v4/b4/fd/80/b4fd8051-7763-fbb1-4577-d2aba243f312/AppIcon-1x_U007emarketing-0-10-0-85-220.png/512x512bb.jpg" 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://tulipbot.com/img/av-1.png"> | |
</div> | |
<div class="message">{{MSG}}</div> | |
</div> | |
''' |