Samyurta commited on
Commit
f0113f4
·
1 Parent(s): 578edad

Create htmlTemplates.py

Browse files
Files changed (1) hide show
  1. htmlTemplates.py +49 -0
htmlTemplates.py ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ css = '''
2
+ <style>
3
+ body {
4
+ background-color: #FF0000; /* Replace with your preferred color code */
5
+ }
6
+ .chat-message {
7
+ padding: 1.5rem; border-radius: 0.5rem; margin-bottom: 1rem; display: flex
8
+ }
9
+ .chat-message.user {
10
+ background-color: #2b313e
11
+ }
12
+ .chat-message.bot {
13
+ background-color: #475063
14
+ }
15
+ .chat-message .avatar {
16
+ width: 20%;
17
+ }
18
+ .chat-message .avatar img {
19
+ max-width: 78px;
20
+ max-height: 78px;
21
+ border-radius: 50%;
22
+ object-fit: cover;
23
+ }
24
+ .chat-message .message {
25
+ width: 80%;
26
+ padding: 0 1.5rem;
27
+ color: #fff;
28
+ }
29
+
30
+ '''
31
+
32
+
33
+ bot_template = '''
34
+ <div class="chat-message bot">
35
+ <div class="avatar">
36
+ <img src="https://img.freepik.com/premium-photo/robot-android-chatbot-ai-bot-cartoon-3d-style-character-design-illustration-generative-aixa_159242-24341.jpg" style="max-height: 78px; max-width: 78px; border-radius: 50%; object-fit: cover;">
37
+ </div>
38
+ <div class="message">{{MSG}}</div>
39
+ </div>
40
+ '''
41
+
42
+ user_template = '''
43
+ <div class="chat-message user">
44
+ <div class="avatar">
45
+ <img src="https://i.ibb.co/rdZC7LZ/Photo-logo-1.png">
46
+ </div>
47
+ <div class="message">{{MSG}}</div>
48
+ </div>
49
+ '''