Nischal Subedi commited on
Commit
b217ae2
·
1 Parent(s): b8732a6
Files changed (1) hide show
  1. app.py +17 -43
app.py CHANGED
@@ -293,7 +293,7 @@ Answer:"""
293
  /* Import legible fonts from Google Fonts */
294
  @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@600;700;800&display=swap');
295
 
296
- /* Force light theme variables, overriding dark mode */
297
  :root {
298
  --primary-color: #FF8C00;
299
  --primary-hover: #E07B00;
@@ -309,28 +309,6 @@ Answer:"""
309
  --error-bg: #FFF0E0;
310
  --error-border: #FFD2B2;
311
  --error-text: #E05C00;
312
- --input-bg: #FFFFFF;
313
- }
314
-
315
- /* Ensure dark mode is overridden with light theme */
316
- @media (prefers-color-scheme: dark) {
317
- body {
318
- --primary-color: #FF8C00;
319
- --primary-hover: #E07B00;
320
- --background-primary: hsl(30, 100%, 99.9%);
321
- --background-secondary: hsl(30, 100%, 96%);
322
- --text-primary: #4A3C32;
323
- --text-secondary: #8C7B6F;
324
- --border-color: hsl(30, 70%, 85%);
325
- --border-focus: #FF8C00;
326
- --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
327
- --shadow-md: 0 4px 10px rgba(0,0,0,0.1);
328
- --shadow-lg: 0 10px 20px rgba(0,0,0,0.15);
329
- --error-bg: #FFF0E0;
330
- --error-border: #FFD2B2;
331
- --error-text: #E05C00;
332
- --input-bg: #FFFFFF;
333
- }
334
  }
335
 
336
  body, html {
@@ -383,6 +361,11 @@ Answer:"""
383
  z-index: 1;
384
  animation: float-icon 3s ease-in-out infinite alternate;
385
  }
 
 
 
 
 
386
  .app-header-title {
387
  font-family: 'Poppins', sans-serif !important;
388
  font-size: 3rem !important;
@@ -429,7 +412,7 @@ Answer:"""
429
  display: flex !important;
430
  justify-content: center !important;
431
  align-items: center !important;
432
- width: 100 !important;
433
  flex-direction: column !important;
434
  background-color: transparent !important;
435
  }
@@ -491,7 +474,7 @@ Answer:"""
491
  .gradio-textbox input,
492
  .gradio-radio label,
493
  .placeholder {
494
- background-color: var(--input-bg) !important;
495
  color: var(--text-primary) !important;
496
  }
497
  .gradio-textbox {
@@ -509,7 +492,7 @@ Answer:"""
509
  box-shadow: var(--shadow-sm) !important;
510
  }
511
  .gradio-textbox .scroll-hide {
512
- background-color: var(--input-bg) !important;
513
  }
514
  .gradio-textbox textarea:focus,
515
  .gradio-textbox input:focus {
@@ -553,13 +536,13 @@ Answer:"""
553
  }
554
  .gradio-radio input[type="radio"]:checked + label {
555
  background-color: var(--primary-color) !important;
556
- color: #FFFFFF !important;
557
  border-color: var(--primary-hover) !important;
558
  box-shadow: var(--shadow-md) !important;
559
  transform: translateY(-1px) !important;
560
  }
561
  .gradio-radio input[type="radio"]:checked + label span.text-lg {
562
- color: #FFFFFF !important;
563
  }
564
  .gradio-radio .gr-form {
565
  padding: 0 !important;
@@ -580,10 +563,6 @@ Answer:"""
580
  text-align: left !important;
581
  background-color: transparent !important;
582
  }
583
- .gr-prose a {
584
- color: var(--primary-color) !important;
585
- text-decoration: underline !important;
586
- }
587
  .input-column {
588
  display: flex !important;
589
  flex-direction: column !important;
@@ -592,7 +571,7 @@ Answer:"""
592
  }
593
  .input-field {
594
  flex: none !important;
595
- width: 100 !important;
596
  }
597
  .button-row {
598
  display: flex !important;
@@ -661,6 +640,10 @@ Answer:"""
661
  text-align: left !important;
662
  color: var(--text-primary) !important;
663
  }
 
 
 
 
664
  .response-header {
665
  font-size: 1.3rem !important;
666
  font-weight: 700 !important;
@@ -830,15 +813,6 @@ Answer:"""
830
  font-size: 1rem !important;
831
  }
832
  }
833
- @keyframes float-icon {
834
- 0% { transform: translateY(0px); }
835
- 50% { transform: translateY(-5px); }
836
- 100% { transform: translateY(0px); }
837
- }
838
- @keyframes fadeInAndSlideUp {
839
- from { opacity: 0; transform: translateY(15px); }
840
- to { opacity: 1; transform: translateY(0); }
841
- }
842
  """
843
 
844
  with gr.Blocks(css=custom_css, title="Landlord-Tenant Rights Assistant") as demo:
@@ -958,7 +932,7 @@ Answer:"""
958
  outputs=[api_key_input, query_input, state_input, output]
959
  )
960
 
961
- return demo
962
 
963
  # --- Main Execution Block (UNCHANGED from original logic) ---
964
  if __name__ == "__main__":
 
293
  /* Import legible fonts from Google Fonts */
294
  @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@600;700;800&display=swap');
295
 
296
+ /* Root variables for consistent light theme */
297
  :root {
298
  --primary-color: #FF8C00;
299
  --primary-hover: #E07B00;
 
309
  --error-bg: #FFF0E0;
310
  --error-border: #FFD2B2;
311
  --error-text: #E05C00;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
312
  }
313
 
314
  body, html {
 
361
  z-index: 1;
362
  animation: float-icon 3s ease-in-out infinite alternate;
363
  }
364
+ @keyframes float-icon {
365
+ 0% { transform: translateY(0px); }
366
+ 50% { transform: translateY(-5px); }
367
+ 100% { transform: translateY(0px); }
368
+ }
369
  .app-header-title {
370
  font-family: 'Poppins', sans-serif !important;
371
  font-size: 3rem !important;
 
412
  display: flex !important;
413
  justify-content: center !important;
414
  align-items: center !important;
415
+ width: 100% !important;
416
  flex-direction: column !important;
417
  background-color: transparent !important;
418
  }
 
474
  .gradio-textbox input,
475
  .gradio-radio label,
476
  .placeholder {
477
+ background-color: var(--background-primary) !important;
478
  color: var(--text-primary) !important;
479
  }
480
  .gradio-textbox {
 
492
  box-shadow: var(--shadow-sm) !important;
493
  }
494
  .gradio-textbox .scroll-hide {
495
+ background-color: var(--background-primary) !important;
496
  }
497
  .gradio-textbox textarea:focus,
498
  .gradio-textbox input:focus {
 
536
  }
537
  .gradio-radio input[type="radio"]:checked + label {
538
  background-color: var(--primary-color) !important;
539
+ color: var(--text-primary) !important;
540
  border-color: var(--primary-hover) !important;
541
  box-shadow: var(--shadow-md) !important;
542
  transform: translateY(-1px) !important;
543
  }
544
  .gradio-radio input[type="radio"]:checked + label span.text-lg {
545
+ color: var(--text-primary) !important;
546
  }
547
  .gradio-radio .gr-form {
548
  padding: 0 !important;
 
563
  text-align: left !important;
564
  background-color: transparent !important;
565
  }
 
 
 
 
566
  .input-column {
567
  display: flex !important;
568
  flex-direction: column !important;
 
571
  }
572
  .input-field {
573
  flex: none !important;
574
+ width: 100% !important;
575
  }
576
  .button-row {
577
  display: flex !important;
 
640
  text-align: left !important;
641
  color: var(--text-primary) !important;
642
  }
643
+ @keyframes fadeInAndSlideUp {
644
+ from { opacity: 0; transform: translateY(15px); }
645
+ to { opacity: 1; transform: translateY(0); }
646
+ }
647
  .response-header {
648
  font-size: 1.3rem !important;
649
  font-weight: 700 !important;
 
813
  font-size: 1rem !important;
814
  }
815
  }
 
 
 
 
 
 
 
 
 
816
  """
817
 
818
  with gr.Blocks(css=custom_css, title="Landlord-Tenant Rights Assistant") as demo:
 
932
  outputs=[api_key_input, query_input, state_input, output]
933
  )
934
 
935
+ return demo
936
 
937
  # --- Main Execution Block (UNCHANGED from original logic) ---
938
  if __name__ == "__main__":