Spaces:
Build error
Build error
File size: 784 Bytes
f9f7ddf | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | 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>
''' |