Wajahat698 commited on
Commit
0f73e3e
·
verified ·
1 Parent(s): 3d7aae0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +28 -25
app.py CHANGED
@@ -560,13 +560,39 @@ def handle_file_upload(file):
560
 
561
  # Gradio interface with light theme
562
  css = """
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
563
  .metric-container {
564
  display: flex;
565
  justify-content: space-around;
566
  margin: 20px 0;
567
  }
568
  """
569
-
570
  # JavaScript to force light theme
571
  js = """
572
  function refresh() {
@@ -579,32 +605,9 @@ function refresh() {
579
  """
580
 
581
 
582
- from gradio.themes.utils import colors
583
-
584
- # Define your custom yellow hue
585
- custom_yellow = colors.Color(
586
- name="custom_yellow",
587
- c50="#EFFE8A", # Your color
588
- c100="#f5f0b3", # Slightly darker
589
- c200="#ebe6a6", # Darker
590
- c300="#e1dc99", # Darker
591
- c400="#d7d28c", # Darker
592
- c500="#cdc87f", # Darker
593
- c600="#c3be72", # Darker
594
- c700="#b9b465", # Darker
595
- c800="#afaa58", # Darker
596
- c900="#a5a04b", # Darkest
597
- )
598
-
599
- # Use the custom hue
600
- custom_theme = gr.themes.Soft(
601
- primary_hue=custom_yellow,
602
- secondary_hue=colors.gray,
603
- neutral_hue=colors.gray,
604
- )
605
 
606
  # Create the Gradio interface with light theme
607
- with gr.Blocks(css=css, js=js, theme=custom_theme) as demo:
608
  gr.Markdown("""
609
  <h2 style="text-align: center; font-size: 2.25rem; font-weight: 600;">
610
  Driver Analysis - Multi-Target Analysis
 
560
 
561
  # Gradio interface with light theme
562
  css = """
563
+ .gradio-container {
564
+ background: linear-gradient(135deg, white 0%, #EFFE8A 100%) !important;
565
+ }
566
+
567
+ .gradio-file {
568
+ background: radial-gradient(circle, #EFFE8A 0%, white 70%) !important;
569
+ border: 2px dashed #d4c86a !important;
570
+ border-radius: 15px !important;
571
+ padding: 20px !important;
572
+ }
573
+
574
+ .gradio-html {
575
+ background: linear-gradient(135deg, #EFFE8A 0%, white 100%) !important;
576
+ border-radius: 15px !important;
577
+ padding: 15px !important;
578
+ border: 1px solid #e6d77a !important;
579
+ box-shadow: 0 3px 6px rgba(239, 254, 138, 0.2) !important;
580
+ }
581
+
582
+ .gradio-image {
583
+ background-color: white !important;
584
+ border: 2px solid #EFFE8A !important;
585
+ border-radius: 12px !important;
586
+ padding: 15px !important;
587
+ box-shadow: 0 4px 8px rgba(239, 254, 138, 0.25) !important;
588
+ }
589
+
590
  .metric-container {
591
  display: flex;
592
  justify-content: space-around;
593
  margin: 20px 0;
594
  }
595
  """
 
596
  # JavaScript to force light theme
597
  js = """
598
  function refresh() {
 
605
  """
606
 
607
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
608
 
609
  # Create the Gradio interface with light theme
610
+ with gr.Blocks(css=css, js=js, theme=gr.themes.Soft()) as demo:
611
  gr.Markdown("""
612
  <h2 style="text-align: center; font-size: 2.25rem; font-weight: 600;">
613
  Driver Analysis - Multi-Target Analysis