Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -2,6 +2,53 @@ import gradio as gr
|
|
2 |
import os
|
3 |
from src.assets import custom_css
|
4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
SPACE_REPO_ID = "IneqMath/IneqMath_Judge_Private"
|
7 |
|
@@ -25,7 +72,7 @@ except Exception as e:
|
|
25 |
load_error = str(e)
|
26 |
print(f"[ERROR] Failed to load remote Space: {load_error}")
|
27 |
|
28 |
-
with gr.Blocks(css=
|
29 |
if remote_space is not None:
|
30 |
remote_space.render()
|
31 |
else:
|
|
|
2 |
import os
|
3 |
from src.assets import custom_css
|
4 |
|
5 |
+
# Additional CSS to override remote Space styling
|
6 |
+
override_css = custom_css + """
|
7 |
+
/* Force override remote Space styling with higher specificity */
|
8 |
+
div.gradio-container .gradio-dataframe th,
|
9 |
+
div.gradio-container div.gradio-dataframe th,
|
10 |
+
.gr-box .gradio-dataframe th,
|
11 |
+
.gr-form .gradio-dataframe th,
|
12 |
+
body .gradio-dataframe th,
|
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 |
+
/* Override hover effects */
|
21 |
+
div.gradio-container .gradio-dataframe th:hover,
|
22 |
+
div.gradio-container div.gradio-dataframe th:hover,
|
23 |
+
.gr-box .gradio-dataframe th:hover,
|
24 |
+
body .gradio-dataframe th:hover {
|
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 table row hover */
|
31 |
+
div.gradio-container .gradio-dataframe tbody tr:hover,
|
32 |
+
body .gradio-dataframe tbody tr:hover {
|
33 |
+
background-color: #e3f2fd !important;
|
34 |
+
}
|
35 |
+
|
36 |
+
/* Additional React table styling overrides */
|
37 |
+
.leaderboard-table-container .header-cell,
|
38 |
+
.leaderboard-table .header-cell,
|
39 |
+
div .header-cell,
|
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 |
|
53 |
SPACE_REPO_ID = "IneqMath/IneqMath_Judge_Private"
|
54 |
|
|
|
72 |
load_error = str(e)
|
73 |
print(f"[ERROR] Failed to load remote Space: {load_error}")
|
74 |
|
75 |
+
with gr.Blocks(css=override_css) as demo:
|
76 |
if remote_space is not None:
|
77 |
remote_space.render()
|
78 |
else:
|