forked from alejandro-ao/ask-multiple-pdfs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhtmlTemplates.py
57 lines (52 loc) · 1.34 KB
/
htmlTemplates.py
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
48
49
50
51
52
53
54
55
56
57
# HTML templates for chat messages from the user and the bot and status of used Google search
css = '''
<style>
.chat-message {
padding: 1.5rem; border-radius: 0.5rem; margin-bottom: 1rem;
}
.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: 90px;
border-radius: 50%;
object-fit: cover;
}
.chat-message .message {
width: 80%;
color: #fff;
}
.chat-message .google-search {
color: #fff;
}
'''
bot_template = '''
<div class="chat-message bot container">
<div class="row">
<div class="avatar">
<img src="https://www.isaca.org/-/media/images/isacadp/project/isaca/articles/press-releases/ai-pulse-poll_pr_550x550.png" style="max-height: 78px; max-width: 78px; border-radius: 50%; object-fit: cover;">
</div>
<div class="col message">{{MSG}}</div>
</div>
<div class="row">
<div class="google-search">{{GOOGLE_SEARCH}}</div>
</div>
</div>
'''
user_template = '''
<div class="chat-message user container">
<div class="row">
<div class="avatar">
<img src="https://upload.wikimedia.org/wikipedia/commons/9/99/Sample_User_Icon.png">
</div>
<div class="col message">{{MSG}}</div>
</div>
</div>
'''