ajsbsd commited on
Commit
0dde314
·
verified ·
1 Parent(s): acadd4b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +64 -1
app.py CHANGED
@@ -128,8 +128,18 @@ def get_random_sample():
128
  dataset = load_dataset()
129
  return np.random.randint(0, dataset.shape[0])
130
 
131
- # Custom CSS for professional styling
132
  custom_css = """
 
 
 
 
 
 
 
 
 
 
133
  #main-container {
134
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
135
  min-height: 100vh;
@@ -141,6 +151,37 @@ custom_css = """
141
  border-radius: 20px;
142
  border: 1px solid rgba(255, 255, 255, 0.1);
143
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
144
  }
145
 
146
  .gr-button {
@@ -185,6 +226,11 @@ custom_css = """
185
  padding: 1.5rem;
186
  border: 1px solid rgba(255, 255, 255, 0.1);
187
  backdrop-filter: blur(10px);
 
 
 
 
 
188
  }
189
 
190
  .status-indicator {
@@ -209,6 +255,23 @@ custom_css = """
209
  border-radius: 8px;
210
  padding: 1rem;
211
  margin: 1rem 0;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
212
  }
213
  """
214
 
 
128
  dataset = load_dataset()
129
  return np.random.randint(0, dataset.shape[0])
130
 
131
+ # Custom CSS for professional styling with forced dark mode
132
  custom_css = """
133
+ /* Force dark mode for all elements */
134
+ * {
135
+ color-scheme: dark !important;
136
+ }
137
+
138
+ body, html {
139
+ background-color: #0f0f23 !important;
140
+ color: #e2e8f0 !important;
141
+ }
142
+
143
  #main-container {
144
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
145
  min-height: 100vh;
 
151
  border-radius: 20px;
152
  border: 1px solid rgba(255, 255, 255, 0.1);
153
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
154
+ color: #e2e8f0 !important;
155
+ }
156
+
157
+ /* Force all text to be light colored */
158
+ p, span, div, label, h1, h2, h3, h4, h5, h6 {
159
+ color: #e2e8f0 !important;
160
+ }
161
+
162
+ /* Fix link colors for both visited and unvisited */
163
+ a, a:link, a:visited, a:hover, a:active {
164
+ color: #60a5fa !important;
165
+ text-decoration: none !important;
166
+ transition: color 0.3s ease !important;
167
+ }
168
+
169
+ a:hover {
170
+ color: #93c5fd !important;
171
+ text-decoration: underline !important;
172
+ }
173
+
174
+ /* Force markdown content colors */
175
+ .markdown-content, .markdown-content * {
176
+ color: #e2e8f0 !important;
177
+ }
178
+
179
+ .markdown-content a, .markdown-content a:link, .markdown-content a:visited {
180
+ color: #60a5fa !important;
181
+ }
182
+
183
+ .markdown-content a:hover {
184
+ color: #93c5fd !important;
185
  }
186
 
187
  .gr-button {
 
226
  padding: 1.5rem;
227
  border: 1px solid rgba(255, 255, 255, 0.1);
228
  backdrop-filter: blur(10px);
229
+ color: #e2e8f0 !important;
230
+ }
231
+
232
+ .feature-card strong {
233
+ color: #93c5fd !important;
234
  }
235
 
236
  .status-indicator {
 
255
  border-radius: 8px;
256
  padding: 1rem;
257
  margin: 1rem 0;
258
+ color: #e2e8f0 !important;
259
+ }
260
+
261
+ .info-panel strong {
262
+ color: #93c5fd !important;
263
+ }
264
+
265
+ /* Force input and form elements to dark mode */
266
+ input, textarea, select {
267
+ background-color: rgba(255, 255, 255, 0.1) !important;
268
+ color: #e2e8f0 !important;
269
+ border: 1px solid rgba(255, 255, 255, 0.2) !important;
270
+ }
271
+
272
+ /* Force plot containers to dark mode */
273
+ .gr-plot {
274
+ background-color: #0f0f23 !important;
275
  }
276
  """
277