MohamedFahim commited on
Commit
4d8b1d4
·
verified ·
1 Parent(s): f47eb6b

Update interface.py

Browse files
Files changed (1) hide show
  1. interface.py +111 -2
interface.py CHANGED
@@ -228,6 +228,115 @@ label {
228
  animation: slideIn 0.5s ease;
229
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
230
  color: #e0e0e0 !important;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
231
  }
232
 
233
  @keyframes slideIn {
@@ -450,8 +559,8 @@ with gr.Blocks(css=custom_css, theme=gr.themes.Soft()) as interface:
450
  with gr.Row():
451
  with gr.Column():
452
  status_output_home = gr.Textbox(label="📊 Status", elem_classes="output-box")
453
- response_output_home = gr.Textbox(label="🤖 AI Response", lines=8, elem_classes="output-box")
454
- sources_output_home = gr.Textbox(label="📚 Sources", lines=6, elem_classes="output-box")
455
 
456
  submit_btn_home.click(
457
  fn=process_homepage_only,
 
228
  animation: slideIn 0.5s ease;
229
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
230
  color: #e0e0e0 !important;
231
+ padding: 1.5rem !important;
232
+ min-height: 200px !important;
233
+ }
234
+
235
+ /* Markdown container styling */
236
+ .output-box .prose, .output-box .markdown {
237
+ font-size: 1.2rem !important;
238
+ line-height: 1.8 !important;
239
+ }
240
+
241
+ /* Markdown styling */
242
+ .output-box h1 {
243
+ color: #00f2fe !important;
244
+ margin-top: 1.5rem !important;
245
+ margin-bottom: 1rem !important;
246
+ font-size: 2rem !important;
247
+ }
248
+
249
+ .output-box h2 {
250
+ color: #00f2fe !important;
251
+ margin-top: 1.5rem !important;
252
+ margin-bottom: 0.75rem !important;
253
+ font-size: 1.6rem !important;
254
+ }
255
+
256
+ .output-box h3 {
257
+ color: #4facfe !important;
258
+ margin-top: 1rem !important;
259
+ margin-bottom: 0.5rem !important;
260
+ font-size: 1.3rem !important;
261
+ }
262
+
263
+ .output-box p {
264
+ color: #e0e0e0 !important;
265
+ line-height: 1.9 !important;
266
+ margin-bottom: 1.2rem !important;
267
+ font-size: 1.15rem !important;
268
+ }
269
+
270
+ .output-box strong {
271
+ color: #4facfe !important;
272
+ font-weight: 600 !important;
273
+ font-size: 1.2rem !important;
274
+ }
275
+
276
+ .output-box code {
277
+ background: rgba(0, 242, 254, 0.15) !important;
278
+ padding: 3px 8px !important;
279
+ border-radius: 6px !important;
280
+ color: #00f2fe !important;
281
+ font-size: 1.1rem !important;
282
+ border: 1px solid rgba(0, 242, 254, 0.3) !important;
283
+ }
284
+
285
+ .output-box ul, .output-box ol {
286
+ font-size: 1.15rem !important;
287
+ line-height: 1.8 !important;
288
+ margin-left: 1.5rem !important;
289
+ color: #e0e0e0 !important;
290
+ }
291
+
292
+ .output-box li {
293
+ margin-bottom: 0.5rem !important;
294
+ }
295
+
296
+ /* Enhanced response area glow effect */
297
+ .output-box:hover {
298
+ border-color: rgba(0, 242, 254, 0.4) !important;
299
+ box-shadow: 0 6px 25px rgba(0, 242, 254, 0.3) !important;
300
+ transition: all 0.3s ease !important;
301
+ }
302
+
303
+ /* JSON viewer styling */
304
+ .output-box pre {
305
+ background: rgba(20, 20, 30, 0.9) !important;
306
+ border-radius: 10px !important;
307
+ padding: 1.5rem !important;
308
+ overflow-x: auto !important;
309
+ border: 1px solid rgba(0, 242, 254, 0.3) !important;
310
+ font-size: 1.05rem !important;
311
+ line-height: 1.6 !important;
312
+ }
313
+
314
+ .output-box .json-holder {
315
+ background: rgba(20, 20, 30, 0.9) !important;
316
+ border-radius: 10px !important;
317
+ padding: 1.5rem !important;
318
+ font-size: 1.05rem !important;
319
+ }
320
+
321
+ .output-box .json-key {
322
+ color: #00f2fe !important;
323
+ font-weight: 600 !important;
324
+ }
325
+
326
+ .output-box .json-string {
327
+ color: #90ee90 !important;
328
+ }
329
+
330
+ .output-box .json-number {
331
+ color: #ffa07a !important;
332
+ }
333
+
334
+ /* Special styling for AI response area */
335
+ div[data-testid="markdown"] {
336
+ background: rgba(35, 35, 50, 0.6) !important;
337
+ padding: 1.5rem !important;
338
+ border-radius: 12px !important;
339
+ border: 1px solid rgba(0, 242, 254, 0.15) !important;
340
  }
341
 
342
  @keyframes slideIn {
 
559
  with gr.Row():
560
  with gr.Column():
561
  status_output_home = gr.Textbox(label="📊 Status", elem_classes="output-box")
562
+ response_output_home = gr.Markdown(label="🤖 AI Response", elem_classes="output-box")
563
+ sources_output_home = gr.JSON(label="📚 Sources", elem_classes="output-box")
564
 
565
  submit_btn_home.click(
566
  fn=process_homepage_only,