Chris commited on
Commit
85c44e6
·
1 Parent(s): c622688

Final 5.3.2

Browse files
Files changed (1) hide show
  1. src/app.py +59 -40
src/app.py CHANGED
@@ -378,15 +378,16 @@ def create_interface():
378
  css = """
379
  /* Base styling for proper contrast */
380
  .gradio-container {
381
- color: #333 !important;
382
- background-color: #ffffff !important;
 
383
  }
384
 
385
  /* Fix all text elements EXCEPT buttons */
386
  .gradio-container *:not(button):not(.gr-button):not(.gr-button-primary):not(.gr-button-secondary),
387
  .gradio-container *:not(button):not(.gr-button):not(.gr-button-primary):not(.gr-button-secondary)::before,
388
  .gradio-container *:not(button):not(.gr-button):not(.gr-button-primary):not(.gr-button-secondary)::after {
389
- color: #333 !important;
390
  }
391
 
392
  /* Headers */
@@ -396,7 +397,7 @@ def create_interface():
396
  .gradio-container h4,
397
  .gradio-container h5,
398
  .gradio-container h6 {
399
- color: #1a1a1a !important;
400
  font-weight: 600 !important;
401
  }
402
 
@@ -405,18 +406,19 @@ def create_interface():
405
  .gradio-container div:not(.gr-button):not(.gr-button-primary):not(.gr-button-secondary),
406
  .gradio-container span:not(.gr-button):not(.gr-button-primary):not(.gr-button-secondary),
407
  .gradio-container label {
408
- color: #333 !important;
409
  }
410
 
411
  /* Input fields */
412
  .gradio-container input,
413
  .gradio-container textarea {
414
- color: #333 !important;
415
  background-color: #ffffff !important;
416
- border: 1px solid #ccc !important;
 
417
  }
418
 
419
- /* Buttons - High specificity to override universal rules */
420
  .gradio-container button,
421
  .gradio-container .gr-button,
422
  .gradio-container .gr-button-primary,
@@ -428,11 +430,12 @@ def create_interface():
428
  color: white !important;
429
  font-weight: 500 !important;
430
  text-shadow: none !important;
 
431
  }
432
 
433
  .gradio-container .gr-button-primary,
434
  .gradio-container button[variant="primary"] {
435
- background: #007bff !important;
436
  color: white !important;
437
  border: none !important;
438
  padding: 8px 16px !important;
@@ -441,7 +444,7 @@ def create_interface():
441
 
442
  .gradio-container .gr-button-secondary,
443
  .gradio-container button[variant="secondary"] {
444
- background: #6c757d !important;
445
  color: white !important;
446
  border: none !important;
447
  padding: 8px 16px !important;
@@ -449,7 +452,7 @@ def create_interface():
449
  }
450
 
451
  .gradio-container button:not([variant]) {
452
- background: #28a745 !important;
453
  color: white !important;
454
  border: none !important;
455
  padding: 8px 16px !important;
@@ -460,20 +463,24 @@ def create_interface():
460
  .gradio-container button:hover,
461
  .gradio-container .gr-button:hover,
462
  .gradio-container .gr-button-primary:hover {
463
- background: #0056b3 !important;
464
  color: white !important;
 
 
465
  }
466
 
467
  .gradio-container .gr-button-secondary:hover {
468
- background: #545b62 !important;
469
  color: white !important;
 
 
470
  }
471
 
472
  /* Markdown content */
473
  .gradio-container .gr-markdown,
474
  .gradio-container .markdown,
475
  .gradio-container .prose {
476
- color: #333 !important;
477
  background-color: transparent !important;
478
  }
479
 
@@ -482,41 +489,41 @@ def create_interface():
482
  max-width: 1200px;
483
  margin: auto;
484
  padding: 20px;
485
- background-color: #ffffff !important;
486
- color: #333 !important;
487
  }
488
 
489
  .output-markdown {
490
  font-size: 16px;
491
  line-height: 1.6;
492
- color: #333 !important;
493
- background-color: #ffffff !important;
494
  }
495
 
496
  .details-box {
497
- background-color: #f8f9fa !important;
498
  padding: 15px;
499
  border-radius: 8px;
500
  margin: 10px 0;
501
- color: #333 !important;
502
- border: 1px solid #dee2e6 !important;
503
  }
504
 
505
  .reasoning-box {
506
- background-color: #fff !important;
507
  padding: 20px;
508
- border: 1px solid #dee2e6 !important;
509
  border-radius: 8px;
510
- color: #333 !important;
511
  }
512
 
513
  .unit4-section {
514
- background-color: #e3f2fd !important;
515
  padding: 20px;
516
  border-radius: 8px;
517
  margin: 20px 0;
518
- color: #1565c0 !important;
519
- border: 1px solid #90caf9 !important;
520
  }
521
 
522
  .unit4-section h1,
@@ -524,30 +531,30 @@ def create_interface():
524
  .unit4-section h3,
525
  .unit4-section p,
526
  .unit4-section div:not(button):not(.gr-button) {
527
- color: #1565c0 !important;
528
  }
529
 
530
  /* Login section */
531
  .oauth-login {
532
- background: #f8f9fa !important;
533
  padding: 10px;
534
  border-radius: 5px;
535
  margin: 10px 0;
536
- color: #333 !important;
537
- border: 1px solid #dee2e6 !important;
538
  }
539
 
540
  /* Tables */
541
  .gradio-container table,
542
  .gradio-container th,
543
  .gradio-container td {
544
- color: #333 !important;
545
  background-color: #ffffff !important;
546
- border: 1px solid #dee2e6 !important;
547
  }
548
 
549
  .gradio-container th {
550
- background-color: #f8f9fa !important;
551
  font-weight: 600 !important;
552
  }
553
 
@@ -556,7 +563,7 @@ def create_interface():
556
  .gradio-container .gr-file,
557
  .gradio-container .gr-textbox,
558
  .gradio-container .gr-checkbox {
559
- color: #333 !important;
560
  background-color: #ffffff !important;
561
  }
562
 
@@ -564,20 +571,32 @@ def create_interface():
564
  .gradio-container .gr-form,
565
  .gradio-container .gr-panel,
566
  .gradio-container .gr-block {
567
- color: #333 !important;
568
  background-color: transparent !important;
569
  }
570
 
571
- /* Ensure dark text on light backgrounds for all content */
572
  .gradio-container .light,
573
  .gradio-container [data-theme="light"] {
574
- color: #333 !important;
575
- background-color: #ffffff !important;
576
  }
577
 
578
  /* Override any problematic inline styles but preserve button colors */
579
  .gradio-container [style*="color: white"]:not(button):not(.gr-button) {
580
- color: #333 !important;
 
 
 
 
 
 
 
 
 
 
 
 
581
  }
582
  """
583
 
 
378
  css = """
379
  /* Base styling for proper contrast */
380
  .gradio-container {
381
+ color: #3c3c3c !important;
382
+ background-color: #faf9f7 !important;
383
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
384
  }
385
 
386
  /* Fix all text elements EXCEPT buttons */
387
  .gradio-container *:not(button):not(.gr-button):not(.gr-button-primary):not(.gr-button-secondary),
388
  .gradio-container *:not(button):not(.gr-button):not(.gr-button-primary):not(.gr-button-secondary)::before,
389
  .gradio-container *:not(button):not(.gr-button):not(.gr-button-primary):not(.gr-button-secondary)::after {
390
+ color: #3c3c3c !important;
391
  }
392
 
393
  /* Headers */
 
397
  .gradio-container h4,
398
  .gradio-container h5,
399
  .gradio-container h6 {
400
+ color: #2c2c2c !important;
401
  font-weight: 600 !important;
402
  }
403
 
 
406
  .gradio-container div:not(.gr-button):not(.gr-button-primary):not(.gr-button-secondary),
407
  .gradio-container span:not(.gr-button):not(.gr-button-primary):not(.gr-button-secondary),
408
  .gradio-container label {
409
+ color: #3c3c3c !important;
410
  }
411
 
412
  /* Input fields */
413
  .gradio-container input,
414
  .gradio-container textarea {
415
+ color: #3c3c3c !important;
416
  background-color: #ffffff !important;
417
+ border: 1px solid #d4c4b0 !important;
418
+ border-radius: 6px !important;
419
  }
420
 
421
+ /* Buttons - Professional neutral theme */
422
  .gradio-container button,
423
  .gradio-container .gr-button,
424
  .gradio-container .gr-button-primary,
 
430
  color: white !important;
431
  font-weight: 500 !important;
432
  text-shadow: none !important;
433
+ border-radius: 6px !important;
434
  }
435
 
436
  .gradio-container .gr-button-primary,
437
  .gradio-container button[variant="primary"] {
438
+ background: #8b7355 !important;
439
  color: white !important;
440
  border: none !important;
441
  padding: 8px 16px !important;
 
444
 
445
  .gradio-container .gr-button-secondary,
446
  .gradio-container button[variant="secondary"] {
447
+ background: #a08b73 !important;
448
  color: white !important;
449
  border: none !important;
450
  padding: 8px 16px !important;
 
452
  }
453
 
454
  .gradio-container button:not([variant]) {
455
+ background: #6b5d4f !important;
456
  color: white !important;
457
  border: none !important;
458
  padding: 8px 16px !important;
 
463
  .gradio-container button:hover,
464
  .gradio-container .gr-button:hover,
465
  .gradio-container .gr-button-primary:hover {
466
+ background: #756749 !important;
467
  color: white !important;
468
+ transform: translateY(-1px) !important;
469
+ box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
470
  }
471
 
472
  .gradio-container .gr-button-secondary:hover {
473
+ background: #8f7c65 !important;
474
  color: white !important;
475
+ transform: translateY(-1px) !important;
476
+ box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
477
  }
478
 
479
  /* Markdown content */
480
  .gradio-container .gr-markdown,
481
  .gradio-container .markdown,
482
  .gradio-container .prose {
483
+ color: #3c3c3c !important;
484
  background-color: transparent !important;
485
  }
486
 
 
489
  max-width: 1200px;
490
  margin: auto;
491
  padding: 20px;
492
+ background-color: #faf9f7 !important;
493
+ color: #3c3c3c !important;
494
  }
495
 
496
  .output-markdown {
497
  font-size: 16px;
498
  line-height: 1.6;
499
+ color: #3c3c3c !important;
500
+ background-color: #faf9f7 !important;
501
  }
502
 
503
  .details-box {
504
+ background-color: #f5f3f0 !important;
505
  padding: 15px;
506
  border-radius: 8px;
507
  margin: 10px 0;
508
+ color: #3c3c3c !important;
509
+ border: 1px solid #e0d5c7 !important;
510
  }
511
 
512
  .reasoning-box {
513
+ background-color: #ffffff !important;
514
  padding: 20px;
515
+ border: 1px solid #e0d5c7 !important;
516
  border-radius: 8px;
517
+ color: #3c3c3c !important;
518
  }
519
 
520
  .unit4-section {
521
+ background-color: #f0ede8 !important;
522
  padding: 20px;
523
  border-radius: 8px;
524
  margin: 20px 0;
525
+ color: #4a4035 !important;
526
+ border: 1px solid #d4c4b0 !important;
527
  }
528
 
529
  .unit4-section h1,
 
531
  .unit4-section h3,
532
  .unit4-section p,
533
  .unit4-section div:not(button):not(.gr-button) {
534
+ color: #4a4035 !important;
535
  }
536
 
537
  /* Login section */
538
  .oauth-login {
539
+ background: #f5f3f0 !important;
540
  padding: 10px;
541
  border-radius: 5px;
542
  margin: 10px 0;
543
+ color: #3c3c3c !important;
544
+ border: 1px solid #e0d5c7 !important;
545
  }
546
 
547
  /* Tables */
548
  .gradio-container table,
549
  .gradio-container th,
550
  .gradio-container td {
551
+ color: #3c3c3c !important;
552
  background-color: #ffffff !important;
553
+ border: 1px solid #e0d5c7 !important;
554
  }
555
 
556
  .gradio-container th {
557
+ background-color: #f5f3f0 !important;
558
  font-weight: 600 !important;
559
  }
560
 
 
563
  .gradio-container .gr-file,
564
  .gradio-container .gr-textbox,
565
  .gradio-container .gr-checkbox {
566
+ color: #3c3c3c !important;
567
  background-color: #ffffff !important;
568
  }
569
 
 
571
  .gradio-container .gr-form,
572
  .gradio-container .gr-panel,
573
  .gradio-container .gr-block {
574
+ color: #3c3c3c !important;
575
  background-color: transparent !important;
576
  }
577
 
578
+ /* Ensure proper text on light backgrounds */
579
  .gradio-container .light,
580
  .gradio-container [data-theme="light"] {
581
+ color: #3c3c3c !important;
582
+ background-color: #faf9f7 !important;
583
  }
584
 
585
  /* Override any problematic inline styles but preserve button colors */
586
  .gradio-container [style*="color: white"]:not(button):not(.gr-button) {
587
+ color: #3c3c3c !important;
588
+ }
589
+
590
+ /* Professional spacing and shadows */
591
+ .gradio-container .gr-box {
592
+ box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
593
+ border-radius: 8px !important;
594
+ }
595
+
596
+ /* Loading states */
597
+ .gradio-container .loading {
598
+ background-color: #f5f3f0 !important;
599
+ color: #6b5d4f !important;
600
  }
601
  """
602