sango07 commited on
Commit
56b5e53
·
verified ·
1 Parent(s): 6cc068f

Update htmlTemplate.py

Browse files
Files changed (1) hide show
  1. htmlTemplate.py +13 -29
htmlTemplate.py CHANGED
@@ -1,15 +1,19 @@
 
1
  css = '''
2
  <style>
3
  @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap');
 
4
  body {
5
  background-color: #f4f6f9;
6
  font-family: 'Inter', sans-serif;
7
  }
 
8
  .chat-container {
9
  max-width: 800px;
10
  margin: 0 auto;
11
  padding: 20px;
12
  }
 
13
  .chat-message {
14
  display: flex;
15
  margin-bottom: 1.5rem;
@@ -18,18 +22,22 @@ body {
18
  overflow: hidden;
19
  transition: all 0.3s ease;
20
  }
 
21
  .chat-message:hover {
22
  transform: translateY(-5px);
23
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
24
  }
 
25
  .chat-message.user {
26
  background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
27
  color: white;
28
  }
 
29
  .chat-message.bot {
30
  background: linear-gradient(135deg, #38ef7d 0%, #11998e 100%);
31
  color: white;
32
  }
 
33
  .chat-message .avatar {
34
  width: 15%;
35
  display: flex;
@@ -38,6 +46,7 @@ body {
38
  padding: 10px;
39
  background-color: rgba(255, 255, 255, 0.1);
40
  }
 
41
  .chat-message .avatar img {
42
  width: 50px;
43
  height: 50px;
@@ -45,47 +54,21 @@ body {
45
  object-fit: cover;
46
  border: 2px solid rgba(255, 255, 255, 0.3);
47
  }
 
48
  .chat-message .message {
49
  width: 85%;
50
  padding: 15px;
51
  font-size: 1rem;
52
  line-height: 1.6;
53
  }
 
54
  .chat-message.user .message {
55
  text-align: left;
56
  }
57
- .upload-section {
58
- background-color: white;
59
- border-radius: 12px;
60
- padding: 20px;
61
- box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
62
- margin-bottom: 20px;
63
- }
64
- .upload-section h3 {
65
- color: #2575fc;
66
- margin-bottom: 15px;
67
- }
68
- .stTextInput > div > div > input {
69
- border-radius: 8px;
70
- border: 1px solid #e0e0e0;
71
- padding: 10px;
72
- font-size: 1rem;
73
- }
74
- .stButton > button {
75
- background-color: #2575fc !important;
76
- color: white !important;
77
- border-radius: 8px !important;
78
- padding: 10px 20px !important;
79
- transition: all 0.3s ease !important;
80
- }
81
- .stButton > button:hover {
82
- background-color: #1a5aff !important;
83
- transform: translateY(-2px);
84
- box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
85
- }
86
  </style>
87
  '''
88
 
 
89
  bot_template = '''
90
  <div class="chat-message bot">
91
  <div class="avatar">
@@ -95,6 +78,7 @@ bot_template = '''
95
  </div>
96
  '''
97
 
 
98
  user_template = '''
99
  <div class="chat-message user">
100
  <div class="avatar">
 
1
+ # HTML and CSS styling for the chat application
2
  css = '''
3
  <style>
4
  @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap');
5
+
6
  body {
7
  background-color: #f4f6f9;
8
  font-family: 'Inter', sans-serif;
9
  }
10
+
11
  .chat-container {
12
  max-width: 800px;
13
  margin: 0 auto;
14
  padding: 20px;
15
  }
16
+
17
  .chat-message {
18
  display: flex;
19
  margin-bottom: 1.5rem;
 
22
  overflow: hidden;
23
  transition: all 0.3s ease;
24
  }
25
+
26
  .chat-message:hover {
27
  transform: translateY(-5px);
28
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
29
  }
30
+
31
  .chat-message.user {
32
  background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
33
  color: white;
34
  }
35
+
36
  .chat-message.bot {
37
  background: linear-gradient(135deg, #38ef7d 0%, #11998e 100%);
38
  color: white;
39
  }
40
+
41
  .chat-message .avatar {
42
  width: 15%;
43
  display: flex;
 
46
  padding: 10px;
47
  background-color: rgba(255, 255, 255, 0.1);
48
  }
49
+
50
  .chat-message .avatar img {
51
  width: 50px;
52
  height: 50px;
 
54
  object-fit: cover;
55
  border: 2px solid rgba(255, 255, 255, 0.3);
56
  }
57
+
58
  .chat-message .message {
59
  width: 85%;
60
  padding: 15px;
61
  font-size: 1rem;
62
  line-height: 1.6;
63
  }
64
+
65
  .chat-message.user .message {
66
  text-align: left;
67
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
68
  </style>
69
  '''
70
 
71
+ # Bot message template
72
  bot_template = '''
73
  <div class="chat-message bot">
74
  <div class="avatar">
 
78
  </div>
79
  '''
80
 
81
+ # User message template
82
  user_template = '''
83
  <div class="chat-message user">
84
  <div class="avatar">