Nischal Subedi commited on
Commit
270a5fa
·
1 Parent(s): 7ef7420
Files changed (1) hide show
  1. app.py +38 -30
app.py CHANGED
@@ -292,16 +292,16 @@ Answer:"""
292
  custom_css = """
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 theming (light mode) */
297
  :root {
298
  --primary-color: #FF8C00;
299
  --primary-hover: #E07B00;
300
- --background-primary: #FFFFFF;
301
- --background-secondary: #F9F5F1;
302
- --text-primary: #2D1B00;
303
- --text-secondary: #5C4033;
304
- --border-color: #D9C4B0;
305
  --border-focus: #FF8C00;
306
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
307
  --shadow-md: 0 4px 10px rgba(0,0,0,0.1);
@@ -309,29 +309,30 @@ Answer:"""
309
  --error-bg: #FFF0E0;
310
  --error-border: #FFD2B2;
311
  --error-text: #E05C00;
 
312
  }
313
-
314
  /* Dark mode variables */
315
  @media (prefers-color-scheme: dark) {
316
  body {
317
- --primary-color: #FFA500;
318
- --primary-hover: #CC8400;
319
- --background-primary: #2C2C2C;
320
- --background-secondary: #1F1F1F;
321
- --text-primary: #F5E8E0;
322
- --text-secondary: #C0B0A0;
323
- --border-color: #4A4035;
324
- --border-focus: #FFA500;
325
- --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
326
- --shadow-md: 0 4px 10px rgba(0,0,0,0.4);
327
- --shadow-lg: 0 10px 20px rgba(0,0,0,0.5);
328
- --error-bg: #400000;
329
- --error-border: #800000;
330
- --error-text: #FF6666;
 
331
  }
332
  }
333
-
334
- /* General styles */
335
  body, html {
336
  background-color: var(--background-secondary) !important;
337
  color: var(--text-primary) !important;
@@ -368,7 +369,7 @@ Answer:"""
368
  left: 0;
369
  width: 100%;
370
  height: 100%;
371
- background: radial-gradient(circle at top left, rgba(255,140,0,0.3) 0%, transparent 60%), radial-gradient(circle at bottom right, rgba(255,140,0,0.3) 0%, transparent 60%);
372
  z-index: 0;
373
  opacity: 0.8;
374
  pointer-events: none;
@@ -394,6 +395,7 @@ Answer:"""
394
  z-index: 1;
395
  display: inline-block;
396
  max-width: 100%;
 
397
  }
398
  .app-header-tagline {
399
  font-size: 1.25rem !important;
@@ -490,9 +492,8 @@ Answer:"""
490
  .gradio-textbox input,
491
  .gradio-radio label,
492
  .placeholder {
493
- background-color: var(--background-primary) !important;
494
  color: var(--text-primary) !important;
495
- border: 2px solid var(--border-color) !important;
496
  }
497
  .gradio-textbox {
498
  margin-bottom: 0.5rem !important;
@@ -508,11 +509,14 @@ Answer:"""
508
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
509
  box-shadow: var(--shadow-sm) !important;
510
  }
 
 
 
511
  .gradio-textbox textarea:focus,
512
  .gradio-textbox input:focus {
513
  outline: none !important;
514
  border-color: var(--border-focus) !important;
515
- box-shadow: 0 0 0 4px rgba(255, 140, 0, 0.2) !important;
516
  }
517
  .gradio-radio {
518
  padding: 0 !important;
@@ -550,13 +554,13 @@ Answer:"""
550
  }
551
  .gradio-radio input[type="radio"]:checked + label {
552
  background-color: var(--primary-color) !important;
553
- color: var(--text-primary) !important;
554
  border-color: var(--primary-hover) !important;
555
  box-shadow: var(--shadow-md) !important;
556
  transform: translateY(-1px) !important;
557
  }
558
  .gradio-radio input[type="radio"]:checked + label span.text-lg {
559
- color: var(--text-primary) !important;
560
  }
561
  .gradio-radio .gr-form {
562
  padding: 0 !important;
@@ -577,6 +581,10 @@ Answer:"""
577
  text-align: left !important;
578
  background-color: transparent !important;
579
  }
 
 
 
 
580
  .input-column {
581
  display: flex !important;
582
  flex-direction: column !important;
@@ -585,7 +593,7 @@ Answer:"""
585
  }
586
  .input-field {
587
  flex: none !important;
588
- width: 100 !important;
589
  }
590
  .button-row {
591
  display: flex !important;
 
292
  custom_css = """
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 theming (light mode) */
297
  :root {
298
  --primary-color: #FF8C00;
299
  --primary-hover: #E07B00;
300
+ --background-primary: hsl(30, 100%, 99.9%);
301
+ --background-secondary: hsl(30, 100%, 96%);
302
+ --text-primary: #4A3C32;
303
+ --text-secondary: #8C7B6F;
304
+ --border-color: hsl(30, 70%, 85%);
305
  --border-focus: #FF8C00;
306
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
307
  --shadow-md: 0 4px 10px rgba(0,0,0,0.1);
 
309
  --error-bg: #FFF0E0;
310
  --error-border: #FFD2B2;
311
  --error-text: #E05C00;
312
+ --input-bg: #FFFFFF;
313
  }
314
+
315
  /* Dark mode variables */
316
  @media (prefers-color-scheme: dark) {
317
  body {
318
+ --primary-color: #FF9500;
319
+ --primary-hover: #D07A00;
320
+ --background-primary: #2D2D2D;
321
+ --background-secondary: #383838;
322
+ --text-primary: #F0E6D2;
323
+ --text-secondary: #C0B090;
324
+ --border-color: #5A5A5A;
325
+ --border-focus: #FF9500;
326
+ --shadow-sm: 0 2px 4px rgba(0,0,0,0.3);
327
+ --shadow-md: 0 6px 12px rgba(0,0,0,0.4);
328
+ --shadow-lg: 0 12px 24px rgba(0,0,0,0.5);
329
+ --error-bg: #4A0000;
330
+ --error-border: #660000;
331
+ --error-text: #FF9999;
332
+ --input-bg: #454545;
333
  }
334
  }
335
+
 
336
  body, html {
337
  background-color: var(--background-secondary) !important;
338
  color: var(--text-primary) !important;
 
369
  left: 0;
370
  width: 100%;
371
  height: 100%;
372
+ background: radial-gradient(circle at top left, rgba(255,149,0,0.4) 0%, transparent 60%), radial-gradient(circle at bottom right, rgba(255,149,0,0.4) 0%, transparent 60%);
373
  z-index: 0;
374
  opacity: 0.8;
375
  pointer-events: none;
 
395
  z-index: 1;
396
  display: inline-block;
397
  max-width: 100%;
398
+ text-shadow: 1px 1px 2px rgba(0,0,0,0.1); /* Added for better readability */
399
  }
400
  .app-header-tagline {
401
  font-size: 1.25rem !important;
 
492
  .gradio-textbox input,
493
  .gradio-radio label,
494
  .placeholder {
495
+ background-color: var(--input-bg) !important;
496
  color: var(--text-primary) !important;
 
497
  }
498
  .gradio-textbox {
499
  margin-bottom: 0.5rem !important;
 
509
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
510
  box-shadow: var(--shadow-sm) !important;
511
  }
512
+ .gradio-textbox .scroll-hide {
513
+ background-color: var(--input-bg) !important;
514
+ }
515
  .gradio-textbox textarea:focus,
516
  .gradio-textbox input:focus {
517
  outline: none !important;
518
  border-color: var(--border-focus) !important;
519
+ box-shadow: 0 0 0 4px rgba(255, 149, 0, 0.2) !important;
520
  }
521
  .gradio-radio {
522
  padding: 0 !important;
 
554
  }
555
  .gradio-radio input[type="radio"]:checked + label {
556
  background-color: var(--primary-color) !important;
557
+ color: #FFFFFF !important; /* White text for better contrast on primary color */
558
  border-color: var(--primary-hover) !important;
559
  box-shadow: var(--shadow-md) !important;
560
  transform: translateY(-1px) !important;
561
  }
562
  .gradio-radio input[type="radio"]:checked + label span.text-lg {
563
+ color: #FFFFFF !important;
564
  }
565
  .gradio-radio .gr-form {
566
  padding: 0 !important;
 
581
  text-align: left !important;
582
  background-color: transparent !important;
583
  }
584
+ .gr-prose a {
585
+ color: var(--primary-color) !important;
586
+ text-decoration: underline !important;
587
+ }
588
  .input-column {
589
  display: flex !important;
590
  flex-direction: column !important;
 
593
  }
594
  .input-field {
595
  flex: none !important;
596
+ width: 100% !important;
597
  }
598
  .button-row {
599
  display: flex !important;