chansung commited on
Commit
232dbeb
·
verified ·
1 Parent(s): 10769e2

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. gradio_app.py +134 -1
gradio_app.py CHANGED
@@ -302,7 +302,7 @@ def create_gradio_interface():
302
  display: flex !important;
303
  }
304
 
305
- /* Modal Content - consistent light theme */
306
  .modal-content {
307
  background: #fefcfa !important;
308
  border: 2px solid #f0c5b8 !important;
@@ -360,6 +360,86 @@ def create_gradio_interface():
360
  flex: 1 !important;
361
  }
362
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
363
 
364
 
365
  .generate-btn:hover {
@@ -829,6 +909,59 @@ def create_gradio_interface():
829
  text-transform: none !important;
830
  }
831
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
832
  /* Additional targeting for accordion buttons */
833
  button.label-wrap {
834
  background: #f9f0ec !important;
 
302
  display: flex !important;
303
  }
304
 
305
+ /* Modal Content - with dark mode support */
306
  .modal-content {
307
  background: #fefcfa !important;
308
  border: 2px solid #f0c5b8 !important;
 
360
  flex: 1 !important;
361
  }
362
 
363
+ /* Dark mode overrides for system dark mode */
364
+ @media (prefers-color-scheme: dark) {
365
+ .modal-content {
366
+ background: #1a1a1a !important;
367
+ border: 2px solid #404040 !important;
368
+ color: #e5e5e5 !important;
369
+ }
370
+
371
+ .modal-header {
372
+ border-bottom: 1px solid #404040 !important;
373
+ }
374
+
375
+ .modal-header h3 {
376
+ color: #e5e5e5 !important;
377
+ }
378
+
379
+ .modal-close-btn {
380
+ background: #404040 !important;
381
+ border: 1px solid #666 !important;
382
+ color: #e5e5e5 !important;
383
+ }
384
+
385
+ .modal-close-btn:hover {
386
+ background: #555 !important;
387
+ }
388
+
389
+ .prompt-container {
390
+ background: #2a2a2a !important;
391
+ border: 1px solid #404040 !important;
392
+ }
393
+ }
394
+
395
+ /* Gradio dark mode overrides */
396
+ .dark .modal-content,
397
+ .gradio-container.dark .modal-content,
398
+ html.dark .modal-content,
399
+ body.dark .modal-content {
400
+ background: #1a1a1a !important;
401
+ border: 2px solid #404040 !important;
402
+ color: #e5e5e5 !important;
403
+ }
404
+
405
+ .dark .modal-header,
406
+ .gradio-container.dark .modal-header,
407
+ html.dark .modal-header,
408
+ body.dark .modal-header {
409
+ border-bottom: 1px solid #404040 !important;
410
+ }
411
+
412
+ .dark .modal-header h3,
413
+ .gradio-container.dark .modal-header h3,
414
+ html.dark .modal-header h3,
415
+ body.dark .modal-header h3 {
416
+ color: #e5e5e5 !important;
417
+ }
418
+
419
+ .dark .modal-close-btn,
420
+ .gradio-container.dark .modal-close-btn,
421
+ html.dark .modal-close-btn,
422
+ body.dark .modal-close-btn {
423
+ background: #404040 !important;
424
+ border: 1px solid #666 !important;
425
+ color: #e5e5e5 !important;
426
+ }
427
+
428
+ .dark .modal-close-btn:hover,
429
+ .gradio-container.dark .modal-close-btn:hover,
430
+ html.dark .modal-close-btn:hover,
431
+ body.dark .modal-close-btn:hover {
432
+ background: #555 !important;
433
+ }
434
+
435
+ .dark .prompt-container,
436
+ .gradio-container.dark .prompt-container,
437
+ html.dark .prompt-container,
438
+ body.dark .prompt-container {
439
+ background: #2a2a2a !important;
440
+ border: 1px solid #404040 !important;
441
+ }
442
+
443
 
444
 
445
  .generate-btn:hover {
 
909
  text-transform: none !important;
910
  }
911
 
912
+ /* Dark mode accordion title styling - system dark mode */
913
+ @media (prefers-color-scheme: dark) {
914
+ button.label-wrap span:first-child,
915
+ button.label-wrap.svelte-1w6vloh span:first-child,
916
+ .label-wrap span:first-child,
917
+ button.label-wrap > span:first-child,
918
+ button[class*="label-wrap"] span:first-child {
919
+ color: #e5e5e5 !important;
920
+ text-shadow: 0 1px 2px rgba(255,255,255,0.1) !important;
921
+ }
922
+
923
+ button.label-wrap {
924
+ background: #2a2a2a !important;
925
+ border: 1px solid #404040 !important;
926
+ }
927
+
928
+ button.label-wrap:hover {
929
+ background: #353535 !important;
930
+ }
931
+ }
932
+
933
+ /* Dark mode accordion title styling - Gradio dark mode */
934
+ .dark button.label-wrap span:first-child,
935
+ .gradio-container.dark button.label-wrap span:first-child,
936
+ html.dark button.label-wrap span:first-child,
937
+ body.dark button.label-wrap span:first-child,
938
+ .dark button.label-wrap.svelte-1w6vloh span:first-child,
939
+ .gradio-container.dark button.label-wrap.svelte-1w6vloh span:first-child,
940
+ html.dark button.label-wrap.svelte-1w6vloh span:first-child,
941
+ body.dark button.label-wrap.svelte-1w6vloh span:first-child,
942
+ .dark .label-wrap span:first-child,
943
+ .gradio-container.dark .label-wrap span:first-child,
944
+ html.dark .label-wrap span:first-child,
945
+ body.dark .label-wrap span:first-child {
946
+ color: #e5e5e5 !important;
947
+ text-shadow: 0 1px 2px rgba(255,255,255,0.1) !important;
948
+ }
949
+
950
+ .dark button.label-wrap,
951
+ .gradio-container.dark button.label-wrap,
952
+ html.dark button.label-wrap,
953
+ body.dark button.label-wrap {
954
+ background: #2a2a2a !important;
955
+ border: 1px solid #404040 !important;
956
+ }
957
+
958
+ .dark button.label-wrap:hover,
959
+ .gradio-container.dark button.label-wrap:hover,
960
+ html.dark button.label-wrap:hover,
961
+ body.dark button.label-wrap:hover {
962
+ background: #353535 !important;
963
+ }
964
+
965
  /* Additional targeting for accordion buttons */
966
  button.label-wrap {
967
  background: #f9f0ec !important;