Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -261,42 +261,99 @@ def auto_refresh_from_dir(
|
|
| 261 |
|
| 262 |
def build_app() -> gr.Blocks:
|
| 263 |
row_css = """
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 264 |
.gradio-container table.metrics-table th,
|
| 265 |
.gradio-container table.metrics-table td {
|
| 266 |
-
padding:
|
| 267 |
-
border: 1px solid #
|
| 268 |
white-space: nowrap;
|
| 269 |
font-size: 13px;
|
|
|
|
| 270 |
}
|
|
|
|
| 271 |
.gradio-container table.metrics-table th {
|
| 272 |
-
background
|
| 273 |
font-weight: 600;
|
|
|
|
| 274 |
position: sticky;
|
| 275 |
top: 0;
|
| 276 |
z-index: 10;
|
|
|
|
| 277 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 278 |
.gradio-container table.metrics-table {
|
| 279 |
border-collapse: collapse;
|
| 280 |
width: 100%;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 281 |
}
|
|
|
|
|
|
|
| 282 |
.table-container {
|
| 283 |
overflow-x: auto;
|
| 284 |
overflow-y: auto;
|
| 285 |
max-height: 75vh;
|
| 286 |
-
border: 1px solid #
|
| 287 |
border-radius: 8px;
|
| 288 |
background: white;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 289 |
}
|
|
|
|
|
|
|
| 290 |
.info-section {
|
| 291 |
max-height: 400px;
|
| 292 |
overflow-y: auto;
|
| 293 |
padding-right: 10px;
|
| 294 |
}
|
| 295 |
-
|
| 296 |
-
|
| 297 |
-
|
| 298 |
-
|
| 299 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 300 |
}
|
| 301 |
"""
|
| 302 |
|
|
@@ -307,7 +364,7 @@ def build_app() -> gr.Blocks:
|
|
| 307 |
# Left side - Filters (narrower)
|
| 308 |
with gr.Column(scale=2):
|
| 309 |
with gr.Group(elem_classes="filter-section"):
|
| 310 |
-
gr.Markdown("### Filters")
|
| 311 |
|
| 312 |
dir_path = gr.State(RESULT_DIR)
|
| 313 |
|
|
@@ -367,7 +424,7 @@ def build_app() -> gr.Blocks:
|
|
| 367 |
|
| 368 |
# Right side - Table (wider)
|
| 369 |
with gr.Column(scale=5):
|
| 370 |
-
leaderboard_output = gr.HTML(label="Results")
|
| 371 |
|
| 372 |
demo.load(
|
| 373 |
fn=auto_refresh_from_dir,
|
|
|
|
| 261 |
|
| 262 |
def build_app() -> gr.Blocks:
|
| 263 |
row_css = """
|
| 264 |
+
/* Main container styling */
|
| 265 |
+
.gradio-container {
|
| 266 |
+
max-width: 100% !important;
|
| 267 |
+
padding: 20px !important;
|
| 268 |
+
}
|
| 269 |
+
|
| 270 |
+
/* Table styling */
|
| 271 |
.gradio-container table.metrics-table th,
|
| 272 |
.gradio-container table.metrics-table td {
|
| 273 |
+
padding: 10px 14px;
|
| 274 |
+
border: 1px solid #d1d5db;
|
| 275 |
white-space: nowrap;
|
| 276 |
font-size: 13px;
|
| 277 |
+
text-align: left;
|
| 278 |
}
|
| 279 |
+
|
| 280 |
.gradio-container table.metrics-table th {
|
| 281 |
+
background: linear-gradient(to bottom, #f9fafb, #f3f4f6);
|
| 282 |
font-weight: 600;
|
| 283 |
+
color: #374151;
|
| 284 |
position: sticky;
|
| 285 |
top: 0;
|
| 286 |
z-index: 10;
|
| 287 |
+
border-bottom: 2px solid #9ca3af;
|
| 288 |
}
|
| 289 |
+
|
| 290 |
+
.gradio-container table.metrics-table tbody tr:nth-child(even) {
|
| 291 |
+
background-color: #f9fafb;
|
| 292 |
+
}
|
| 293 |
+
|
| 294 |
+
.gradio-container table.metrics-table tbody tr:hover {
|
| 295 |
+
background-color: #f3f4f6;
|
| 296 |
+
}
|
| 297 |
+
|
| 298 |
.gradio-container table.metrics-table {
|
| 299 |
border-collapse: collapse;
|
| 300 |
width: 100%;
|
| 301 |
+
background: white;
|
| 302 |
+
}
|
| 303 |
+
|
| 304 |
+
.gradio-container table.metrics-table a {
|
| 305 |
+
color: #2563eb;
|
| 306 |
+
text-decoration: none;
|
| 307 |
+
}
|
| 308 |
+
|
| 309 |
+
.gradio-container table.metrics-table a:hover {
|
| 310 |
+
color: #1d4ed8;
|
| 311 |
+
text-decoration: underline;
|
| 312 |
}
|
| 313 |
+
|
| 314 |
+
/* Scrollable table container */
|
| 315 |
.table-container {
|
| 316 |
overflow-x: auto;
|
| 317 |
overflow-y: auto;
|
| 318 |
max-height: 75vh;
|
| 319 |
+
border: 1px solid #d1d5db;
|
| 320 |
border-radius: 8px;
|
| 321 |
background: white;
|
| 322 |
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
| 323 |
+
}
|
| 324 |
+
|
| 325 |
+
/* Filter section styling */
|
| 326 |
+
.filter-section {
|
| 327 |
+
background: white;
|
| 328 |
+
padding: 20px;
|
| 329 |
+
border-radius: 8px;
|
| 330 |
+
border: 1px solid #d1d5db;
|
| 331 |
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
| 332 |
}
|
| 333 |
+
|
| 334 |
+
/* Info section */
|
| 335 |
.info-section {
|
| 336 |
max-height: 400px;
|
| 337 |
overflow-y: auto;
|
| 338 |
padding-right: 10px;
|
| 339 |
}
|
| 340 |
+
|
| 341 |
+
/* Checkbox styling */
|
| 342 |
+
.gradio-container label.svelte-1c76wbe {
|
| 343 |
+
margin-bottom: 8px;
|
| 344 |
+
}
|
| 345 |
+
|
| 346 |
+
/* Heading styling */
|
| 347 |
+
.gradio-container h1 {
|
| 348 |
+
color: #111827;
|
| 349 |
+
font-weight: 700;
|
| 350 |
+
margin-bottom: 24px;
|
| 351 |
+
}
|
| 352 |
+
|
| 353 |
+
.gradio-container h3 {
|
| 354 |
+
color: #374151;
|
| 355 |
+
font-weight: 600;
|
| 356 |
+
margin-bottom: 16px;
|
| 357 |
}
|
| 358 |
"""
|
| 359 |
|
|
|
|
| 364 |
# Left side - Filters (narrower)
|
| 365 |
with gr.Column(scale=2):
|
| 366 |
with gr.Group(elem_classes="filter-section"):
|
| 367 |
+
gr.Markdown("### 🎛️ Filters")
|
| 368 |
|
| 369 |
dir_path = gr.State(RESULT_DIR)
|
| 370 |
|
|
|
|
| 424 |
|
| 425 |
# Right side - Table (wider)
|
| 426 |
with gr.Column(scale=5):
|
| 427 |
+
leaderboard_output = gr.HTML(label="📈 Results")
|
| 428 |
|
| 429 |
demo.load(
|
| 430 |
fn=auto_refresh_from_dir,
|