Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -137,31 +137,35 @@ def generate_plot_and_explanation(benchmark_type, methods_selected, x_metric, y_
|
|
137 |
# Custom CSS for frozen first column and clearer table styles
|
138 |
# ---------------------------------------------------------------------------
|
139 |
CUSTOM_CSS = """
|
140 |
-
/*
|
141 |
-
#leaderboard-table
|
142 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
143 |
position: sticky;
|
144 |
left: 0;
|
145 |
background: white;
|
146 |
-
z-index:
|
|
|
147 |
}
|
148 |
-
|
149 |
-
|
150 |
-
#leaderboard-table table tr:nth-child(odd) {
|
151 |
background: #fafafa;
|
152 |
}
|
153 |
-
|
154 |
-
|
155 |
-
#leaderboard-table td:not(:first-child) {
|
156 |
text-align: center;
|
157 |
}
|
158 |
-
|
159 |
-
/* scrollable and taller table */
|
160 |
-
#leaderboard-table .dataframe-wrap {
|
161 |
-
max-height: 1200px;
|
162 |
-
overflow-y: auto;
|
163 |
-
overflow-x: auto;
|
164 |
-
}
|
165 |
"""
|
166 |
|
167 |
# ---------------------------------------------------------------------------
|
|
|
137 |
# Custom CSS for frozen first column and clearer table styles
|
138 |
# ---------------------------------------------------------------------------
|
139 |
CUSTOM_CSS = """
|
140 |
+
/* Freeze first column & improve scrolling for static Dataframe output */
|
141 |
+
#leaderboard-table .dataframe-wrap {
|
142 |
+
overflow-x: auto;
|
143 |
+
overflow-y: auto;
|
144 |
+
max-height: 650px; /* taller table */
|
145 |
+
}
|
146 |
+
#leaderboard-table table {
|
147 |
+
border-collapse: collapse;
|
148 |
+
}
|
149 |
+
#leaderboard-table thead th,
|
150 |
+
#leaderboard-table tbody td {
|
151 |
+
padding: 4px 6px;
|
152 |
+
}
|
153 |
+
#leaderboard-table thead th:first-child,
|
154 |
+
#leaderboard-table tbody td:first-child {
|
155 |
position: sticky;
|
156 |
left: 0;
|
157 |
background: white;
|
158 |
+
z-index: 3; /* stay on top */
|
159 |
+
box-shadow: 2px 0 2px -2px #aaa; /* subtle divider */
|
160 |
}
|
161 |
+
/* striped rows */
|
162 |
+
#leaderboard-table tbody tr:nth-child(odd) {
|
|
|
163 |
background: #fafafa;
|
164 |
}
|
165 |
+
/* center numeric columns */
|
166 |
+
#leaderboard-table tbody td:not(:first-child) {
|
|
|
167 |
text-align: center;
|
168 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
169 |
"""
|
170 |
|
171 |
# ---------------------------------------------------------------------------
|