Aditya Sahu commited on
Commit
151dbcd
·
verified ·
1 Parent(s): 1ed4f67

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -19
app.py CHANGED
@@ -66,7 +66,7 @@ body, html, .gradio-container, #root, .main, .app, .gradio-interface, .gradio-bl
66
  footer, .gradio-footer, .svelte-1ipelgc, .gradio-logo, .gradio-app__settings {
67
  display: none !important;
68
  }
69
- .main-header { text-align: center; margin: 0 !important; color: #3b82f6 !important; font-weight: 600 !important; font-size: 2.5rem; letter-spacing: -0.025em; }
70
  .card { background: #fafafa !important; border-radius: 12px !important; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important; border: 1px solid #e5e7eb !important; margin-bottom: 1.5rem !important; transition: all 0.2s ease-in-out !important; overflow: hidden !important; }
71
  .card-header { background: linear-gradient(135deg, #1975cf 0%, #1557b0 100%) !important; color: white !important; padding: 1rem 1.5rem !important; border-radius: 12px 12px 0 0 !important; font-weight: 600 !important; font-size: 1.1rem !important; }
72
  .card-content { padding: 1.5rem !important; color: #4b5563 !important; line-height: 1.6 !important; background: #fafafa !important; }
@@ -78,34 +78,30 @@ footer, .gradio-footer, .svelte-1ipelgc, .gradio-logo, .gradio-app__settings {
78
  div[data-testid="markdown"] strong { color: #0056b3 !important; font-weight: bold !important; }
79
 
80
  /* Dark theme compatibility */
81
- .dark h1#main_title, .dark #main_title h1 {
82
  color: #4dabf7 !important;
83
- text-shadow: none !important;
84
- border: none !important;
85
- background-color: transparent !important;
86
  }
87
- .dark h3#subtitle, .dark #subtitle h3 {
88
- color: #e9ecef !important;
89
- text-shadow: none !important;
90
- border: none !important;
91
- background-color: transparent !important;
92
  }
93
- .dark #subtitle a {
94
  color: #4dabf7 !important;
 
95
  }
96
 
97
- /* Remove borders from all elements */
98
- [data-testid="markdown"] h1, [data-testid="markdown"] h2, [data-testid="markdown"] h3,
99
- [data-testid="markdown"] h4, [data-testid="markdown"] h5, [data-testid="markdown"] h6,
100
- [data-testid="markdown"] p, [data-testid="markdown"] span {
101
- border: none !important;
102
- box-shadow: none !important;
103
  }
104
  """
105
 
106
  with gr.Blocks(css=custom_css) as demo:
107
- gr.Markdown("<h1 style='font-size:2.5em; color:#007dc3; margin-bottom:0; text-shadow: none; background-color: transparent; border: none;'>SR100 Vision Model Space</h1>", elem_id="main_title")
108
- gr.Markdown("<h3 style='margin-top:0; color:#333; text-shadow: none; background-color: transparent; border: none;'>Vision models for Person Presence developed by Synaptics for specific to Astra SR100 MCU. Learn more at <a href='https://developer.synaptics.com/docs/sr/sr100/quick-start?utm_source=hf' target='_blank' style='color:#007dc3; text-decoration:underline;'>Synaptics AI Developer Zone</a></h3>", elem_id="subtitle")
109
  user_text = gr.Markdown("")
110
  with gr.Row():
111
  with gr.Column(scale=1):
 
66
  footer, .gradio-footer, .svelte-1ipelgc, .gradio-logo, .gradio-app__settings {
67
  display: none !important;
68
  }
69
+ .main-header { text-align: center; margin: 0 !important; color: #3b82f6 !important; font-weight: 600 !portant; font-size: 2.5rem; letter-spacing: -0.025em; }
70
  .card { background: #fafafa !important; border-radius: 12px !important; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important; border: 1px solid #e5e7eb !important; margin-bottom: 1.5rem !important; transition: all 0.2s ease-in-out !important; overflow: hidden !important; }
71
  .card-header { background: linear-gradient(135deg, #1975cf 0%, #1557b0 100%) !important; color: white !important; padding: 1rem 1.5rem !important; border-radius: 12px 12px 0 0 !important; font-weight: 600 !important; font-size: 1.1rem !important; }
72
  .card-content { padding: 1.5rem !important; color: #4b5563 !important; line-height: 1.6 !important; background: #fafafa !important; }
 
78
  div[data-testid="markdown"] strong { color: #0056b3 !important; font-weight: bold !important; }
79
 
80
  /* Dark theme compatibility */
81
+ .dark h1#main_title, .dark #main_title h1, .dark [data-testid="markdown"] h1 {
82
  color: #4dabf7 !important;
83
+ text-shadow: 0px 0px 3px rgba(0,0,0,0.5) !important;
 
 
84
  }
85
+ .dark h3#subtitle, .dark #subtitle h3, .dark [data-testid="markdown"] h3, .dark [data-testid="markdown"] * {
86
+ color: #ffffff !important;
87
+ text-shadow: 0px 0px 2px rgba(0,0,0,0.5) !important;
 
 
88
  }
89
+ .dark #subtitle a, .dark [data-testid="markdown"] a {
90
  color: #4dabf7 !important;
91
+ font-weight: bold !important;
92
  }
93
 
94
+ /* Force text color in dark mode */
95
+ @media (prefers-color-scheme: dark) {
96
+ #subtitle h3, #subtitle * {
97
+ color: #ffffff !important;
98
+ }
 
99
  }
100
  """
101
 
102
  with gr.Blocks(css=custom_css) as demo:
103
+ gr.Markdown("<h1 style='font-size:2.5em; color:#007dc3; margin-bottom:0; text-shadow: 0px 0px 3px rgba(255,255,255,0.5);'>SR100 Vision Model Space</h1>", elem_id="main_title")
104
+ gr.Markdown("<h3 style='margin-top:0; color:#333333; text-shadow: 0px 0px 2px rgba(255,255,255,0.5); font-weight: 500;'>Vision models for Person Presence developed by Synaptics for specific to Astra SR100 MCU. Learn more at <a href='https://developer.synaptics.com/docs/sr/sr100/quick-start?utm_source=hf' target='_blank' style='color:#007dc3; text-decoration:underline;'>Synaptics AI Developer Zone</a></h3>", elem_id="subtitle")
105
  user_text = gr.Markdown("")
106
  with gr.Row():
107
  with gr.Column(scale=1):