Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,52 +1,34 @@
|
|
1 |
import gradio as gr
|
2 |
import os
|
3 |
-
from src.assets import custom_css
|
4 |
|
5 |
-
#
|
6 |
-
|
7 |
-
/*
|
8 |
-
|
9 |
-
|
10 |
-
.
|
11 |
-
|
12 |
-
|
13 |
-
html .gradio-dataframe th {
|
14 |
-
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
|
15 |
-
color: white !important;
|
16 |
-
font-weight: 600 !important;
|
17 |
-
border: 1px solid rgba(255,255,255,0.2) !important;
|
18 |
}
|
19 |
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
background: linear-gradient(135deg, #5a6fd8 0%, #6b4190 100%) !important;
|
26 |
-
transform: translateY(-1px) !important;
|
27 |
-
box-shadow: 0 3px 6px rgba(0,0,0,0.15) !important;
|
28 |
}
|
29 |
|
30 |
-
/* Override
|
31 |
-
|
32 |
-
|
33 |
-
|
|
|
34 |
}
|
35 |
|
36 |
-
/*
|
37 |
-
.
|
38 |
-
.
|
39 |
-
|
40 |
-
body .header-cell {
|
41 |
-
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
|
42 |
-
color: white !important;
|
43 |
-
}
|
44 |
-
|
45 |
-
.leaderboard-table-container .header-cell:hover,
|
46 |
-
.leaderboard-table .header-cell:hover,
|
47 |
-
div .header-cell:hover,
|
48 |
-
body .header-cell:hover {
|
49 |
-
background: linear-gradient(135deg, #5a6fd8 0%, #6b4190 100%) !important;
|
50 |
}
|
51 |
"""
|
52 |
|
@@ -72,7 +54,7 @@ except Exception as e:
|
|
72 |
load_error = str(e)
|
73 |
print(f"[ERROR] Failed to load remote Space: {load_error}")
|
74 |
|
75 |
-
with gr.Blocks(css=
|
76 |
if remote_space is not None:
|
77 |
remote_space.render()
|
78 |
else:
|
|
|
1 |
import gradio as gr
|
2 |
import os
|
|
|
3 |
|
4 |
+
# CSS to change orange UI elements to blue
|
5 |
+
blue_ui_css = """
|
6 |
+
/* Change orange checkboxes and radio buttons to blue */
|
7 |
+
.gradio-container input[type="checkbox"]:checked,
|
8 |
+
.gradio-container .gr-checkbox input:checked + .checkmark,
|
9 |
+
.gradio-container .gr-checkboxgroup input:checked + .checkmark {
|
10 |
+
background-color: #667eea !important;
|
11 |
+
border-color: #667eea !important;
|
|
|
|
|
|
|
|
|
|
|
12 |
}
|
13 |
|
14 |
+
.gradio-container input[type="radio"]:checked,
|
15 |
+
.gradio-container .gr-radio input:checked + .checkmark,
|
16 |
+
.gradio-container .gr-radio input:checked::before {
|
17 |
+
background-color: #667eea !important;
|
18 |
+
border-color: #667eea !important;
|
|
|
|
|
|
|
19 |
}
|
20 |
|
21 |
+
/* Override any orange accent colors */
|
22 |
+
.gradio-container .gr-checkbox input:checked,
|
23 |
+
.gradio-container .gr-checkboxgroup input:checked,
|
24 |
+
.gradio-container .gr-radio input:checked {
|
25 |
+
accent-color: #667eea !important;
|
26 |
}
|
27 |
|
28 |
+
/* Target specific Gradio checkbox styling */
|
29 |
+
.gradio-container label input[type="checkbox"]:checked::before,
|
30 |
+
.gradio-container label input[type="radio"]:checked::before {
|
31 |
+
background-color: #667eea !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
}
|
33 |
"""
|
34 |
|
|
|
54 |
load_error = str(e)
|
55 |
print(f"[ERROR] Failed to load remote Space: {load_error}")
|
56 |
|
57 |
+
with gr.Blocks(css=blue_ui_css) as demo:
|
58 |
if remote_space is not None:
|
59 |
remote_space.render()
|
60 |
else:
|