sgattup commited on
Commit
f0d0431
·
verified ·
1 Parent(s): fba351a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +80 -1
app.py CHANGED
@@ -142,6 +142,82 @@ def ask_estella(message: str, history: list) -> str:
142
  skip_special_tokens=True,
143
  ).strip()
144
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
145
 
146
  demo = gr.ChatInterface(
147
  fn=ask_estella,
@@ -162,4 +238,7 @@ demo = gr.ChatInterface(
162
 
163
 
164
  if __name__ == "__main__":
165
- demo.launch()
 
 
 
 
142
  skip_special_tokens=True,
143
  ).strip()
144
 
145
+ THEME = gr.themes.Soft(
146
+ primary_hue="orange",
147
+ secondary_hue="amber",
148
+ neutral_hue="slate",
149
+ radius_size="lg",
150
+ spacing_size="sm",
151
+ )
152
+
153
+
154
+ CUSTOM_CSS = """
155
+ .gradio-container {
156
+ background:
157
+ radial-gradient(
158
+ circle at 0% 0%,
159
+ rgba(245, 158, 11, 0.14),
160
+ transparent 28rem
161
+ ),
162
+ radial-gradient(
163
+ circle at 100% 0%,
164
+ rgba(16, 185, 129, 0.10),
165
+ transparent 24rem
166
+ ),
167
+ #fffaf2 !important;
168
+ }
169
+
170
+ /* Title */
171
+ .gradio-container h1 {
172
+ color: #9a3412 !important;
173
+ letter-spacing: -0.02em;
174
+ }
175
+
176
+ /* User messages */
177
+ .gradio-container .message.user {
178
+ background: #fef3c7 !important;
179
+ border: 1px solid #fcd34d !important;
180
+ border-radius: 18px !important;
181
+ }
182
+
183
+ /* Estella messages */
184
+ .gradio-container .message.bot {
185
+ background: #ecfdf5 !important;
186
+ border: 1px solid #a7f3d0 !important;
187
+ border-radius: 18px !important;
188
+ }
189
+
190
+ /* Text input */
191
+ .gradio-container textarea {
192
+ border: 1px solid #f3c677 !important;
193
+ border-radius: 16px !important;
194
+ background: #fffdf8 !important;
195
+ }
196
+
197
+ /* Main submit button */
198
+ .gradio-container button.primary {
199
+ background: linear-gradient(135deg, #d97706, #f59e0b) !important;
200
+ border: none !important;
201
+ color: white !important;
202
+ border-radius: 14px !important;
203
+ font-weight: 700 !important;
204
+ }
205
+
206
+ .gradio-container button.primary:hover {
207
+ background: linear-gradient(135deg, #b45309, #d97706) !important;
208
+ }
209
+
210
+ /* Example buttons */
211
+ .gradio-container button.secondary {
212
+ border-color: #f3c677 !important;
213
+ color: #92400e !important;
214
+ }
215
+
216
+ /* Hide the default footer */
217
+ footer {
218
+ display: none !important;
219
+ }
220
+ """
221
 
222
  demo = gr.ChatInterface(
223
  fn=ask_estella,
 
238
 
239
 
240
  if __name__ == "__main__":
241
+ demo.launch(
242
+ theme=THEME,
243
+ css=CUSTOM_CSS,
244
+ )