JenetGhumman commited on
Commit
2e97725
·
verified ·
1 Parent(s): 882d9fe

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +75 -25
app.py CHANGED
@@ -54,56 +54,106 @@ def get_chatbot_response(user_message, insurance_type, country, conversation_his
54
 
55
  return conversation_history, chat_display
56
 
57
- # ✅ Styling and Theme with Yellow Text in Blue Background
58
  theme = gr.themes.Base().set(
59
- body_background_fill="#00AFFF",
60
- button_primary_background_fill="#0052CC",
61
- button_primary_text_color="white"
62
  )
63
 
64
  custom_css = """
65
- /* Title text with blue-to-yellow gradient */
66
  .title-text {
67
- background: linear-gradient(90deg, #0052CC, #FFD700);
68
  -webkit-background-clip: text;
69
  background-clip: text;
70
  color: transparent;
71
  -webkit-text-fill-color: transparent;
72
- display: inline-block;
73
- width: fit-content;
74
- font-weight: bold;
75
  text-align: center;
76
- font-size: 45px;
 
 
77
  }
78
 
79
- /* Make all regular text yellow if inside a blue background */
80
  body, .gradio-container {
81
- color: #FFD700 !important; /* Yellow text */
 
82
  }
83
 
84
- /* Keep chat messages white for readability */
85
  .chat-message {
 
 
 
 
86
  color: white !important;
87
  }
88
 
89
- /* Insurance buttons */
90
  .insurance-button {
91
- border: 1px solid #FFD700;
92
- background-color: transparent;
93
- font-size: 15px;
94
- padding: 5px 15px;
95
- border-radius: 16px;
96
- margin: 0 5px;
97
- color: #FFD700; /* Yellow text */
 
 
98
  }
 
 
99
  .insurance-button:hover {
100
- background: linear-gradient(90deg, #FFD700, #00AFFF);
101
- color: white;
 
 
102
  }
103
 
104
- /* Chatbot text background styling */
105
  .gradio-container .block.markdown {
106
- color: #FFD700 !important; /* Ensures markdown text is yellow */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
107
  }
108
  """
109
 
 
54
 
55
  return conversation_history, chat_display
56
 
57
+ # ✅ Styling and Theme with a Sophisticated UI
58
  theme = gr.themes.Base().set(
59
+ body_background_fill="linear-gradient(to right, #001F3F, #0052CC)", # Dark navy to royal blue
60
+ button_primary_background_fill="linear-gradient(135deg, #FFD700, #FFAA00)", # Golden gradient
61
+ button_primary_text_color="black"
62
  )
63
 
64
  custom_css = """
65
+ /* Elegant title styling with a gold-illuminated effect */
66
  .title-text {
67
+ background: linear-gradient(90deg, #FFD700, #FFAA00);
68
  -webkit-background-clip: text;
69
  background-clip: text;
70
  color: transparent;
71
  -webkit-text-fill-color: transparent;
72
+ font-weight: 700;
73
+ font-size: 48px;
 
74
  text-align: center;
75
+ text-transform: uppercase;
76
+ letter-spacing: 1.5px;
77
+ text-shadow: 2px 2px 10px rgba(255, 215, 0, 0.3);
78
  }
79
 
80
+ /* Sophisticated body text - Gold on Dark Background */
81
  body, .gradio-container {
82
+ color: #FFD700 !important; /* Premium gold text */
83
+ font-family: 'Inter', sans-serif;
84
  }
85
 
86
+ /* Chat messages - Glassmorphic styling */
87
  .chat-message {
88
+ background: rgba(255, 255, 255, 0.1); /* Subtle transparent white */
89
+ border-radius: 12px;
90
+ padding: 12px;
91
+ backdrop-filter: blur(10px);
92
  color: white !important;
93
  }
94
 
95
+ /* Buttons - Glassmorphism with subtle glow */
96
  .insurance-button {
97
+ border: 2px solid rgba(255, 215, 0, 0.8);
98
+ background: rgba(0, 0, 0, 0.2);
99
+ font-size: 16px;
100
+ font-weight: bold;
101
+ padding: 8px 20px;
102
+ border-radius: 24px;
103
+ margin: 5px;
104
+ color: #FFD700; /* Gold text */
105
+ transition: all 0.3s ease-in-out;
106
  }
107
+
108
+ /* Button hover effect with glowing effect */
109
  .insurance-button:hover {
110
+ background: linear-gradient(90deg, #FFD700, #FFAA00);
111
+ color: black !important;
112
+ transform: scale(1.05);
113
+ box-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
114
  }
115
 
116
+ /* Chatbot container - Transparent glass panel */
117
  .gradio-container .block.markdown {
118
+ background: rgba(255, 255, 255, 0.1);
119
+ border-radius: 12px;
120
+ padding: 15px;
121
+ backdrop-filter: blur(12px);
122
+ color: #FFD700 !important; /* Gold text */
123
+ }
124
+
125
+ /* Input field - Premium styling */
126
+ textarea {
127
+ background: rgba(255, 255, 255, 0.05);
128
+ border: 1px solid rgba(255, 215, 0, 0.5);
129
+ border-radius: 8px;
130
+ color: white !important;
131
+ font-size: 16px;
132
+ padding: 10px;
133
+ }
134
+
135
+ /* Glow effect on input focus */
136
+ textarea:focus {
137
+ box-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
138
+ border-color: #FFD700;
139
+ }
140
+
141
+ /* Send button - Luxurious design */
142
+ button.primary {
143
+ background: linear-gradient(135deg, #FFD700, #FFAA00);
144
+ border: none;
145
+ color: black !important;
146
+ font-weight: bold;
147
+ text-transform: uppercase;
148
+ border-radius: 20px;
149
+ padding: 10px 20px;
150
+ transition: all 0.3s ease-in-out;
151
+ }
152
+
153
+ /* Send button hover */
154
+ button.primary:hover {
155
+ transform: scale(1.1);
156
+ box-shadow: 0 0 15px rgba(255, 215, 0, 0.7);
157
  }
158
  """
159