Spaces:
Runtime error
Runtime error
Fix logo serving with gr.set_static_paths and table column wrapping
Browse files
app.py
CHANGED
|
@@ -494,17 +494,23 @@ CUSTOM_CSS = """
|
|
| 494 |
}
|
| 495 |
|
| 496 |
/* === Tables (Dataframe) === */
|
| 497 |
-
.table-wrap
|
|
|
|
|
|
|
| 498 |
border-radius: 12px !important;
|
| 499 |
overflow-x: auto !important;
|
| 500 |
border: 1px solid #e2e8f0 !important;
|
| 501 |
}
|
| 502 |
-
.table-wrap table
|
|
|
|
| 503 |
border-collapse: collapse !important;
|
| 504 |
-
width:
|
| 505 |
-
|
|
|
|
| 506 |
}
|
| 507 |
-
.table-wrap table thead th
|
|
|
|
|
|
|
| 508 |
background: #f1f5f9 !important;
|
| 509 |
color: #334155 !important;
|
| 510 |
font-weight: 600 !important;
|
|
@@ -514,16 +520,27 @@ CUSTOM_CSS = """
|
|
| 514 |
padding: 12px 16px !important;
|
| 515 |
border-bottom: 2px solid #e2e8f0 !important;
|
| 516 |
white-space: nowrap !important;
|
|
|
|
|
|
|
| 517 |
}
|
| 518 |
-
.table-wrap table tbody td
|
|
|
|
|
|
|
| 519 |
padding: 10px 16px !important;
|
| 520 |
font-size: 0.88rem !important;
|
| 521 |
border-bottom: 1px solid #f1f5f9 !important;
|
| 522 |
white-space: nowrap !important;
|
|
|
|
|
|
|
| 523 |
}
|
| 524 |
-
.table-wrap table tbody tr:hover
|
|
|
|
| 525 |
background: #eff6ff !important;
|
| 526 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 527 |
|
| 528 |
/* === Accordion (FAQ) === */
|
| 529 |
.faq-section .accordion {
|
|
@@ -1525,6 +1542,8 @@ def create_app() -> gr.Blocks:
|
|
| 1525 |
link_text_color_active="*primary_800",
|
| 1526 |
)
|
| 1527 |
|
|
|
|
|
|
|
| 1528 |
with gr.Blocks(
|
| 1529 |
title="ST-WebAgentBench Leaderboard",
|
| 1530 |
theme=theme,
|
|
@@ -1588,6 +1607,7 @@ def create_app() -> gr.Blocks:
|
|
| 1588 |
interactive=False,
|
| 1589 |
label="Ranked by CuP (Completion under Policy)",
|
| 1590 |
elem_id="leaderboard-table",
|
|
|
|
| 1591 |
column_widths=["60px", "140px", "120px", "120px", "70px", "70px", "70px", "80px", "80px", "80px", "60px", "100px"],
|
| 1592 |
)
|
| 1593 |
|
|
|
|
| 494 |
}
|
| 495 |
|
| 496 |
/* === Tables (Dataframe) === */
|
| 497 |
+
.table-wrap,
|
| 498 |
+
#leaderboard-table .table-wrap,
|
| 499 |
+
#leaderboard-table [class*="table"] {
|
| 500 |
border-radius: 12px !important;
|
| 501 |
overflow-x: auto !important;
|
| 502 |
border: 1px solid #e2e8f0 !important;
|
| 503 |
}
|
| 504 |
+
.table-wrap table,
|
| 505 |
+
#leaderboard-table table {
|
| 506 |
border-collapse: collapse !important;
|
| 507 |
+
width: max-content !important;
|
| 508 |
+
min-width: 100% !important;
|
| 509 |
+
table-layout: fixed !important;
|
| 510 |
}
|
| 511 |
+
.table-wrap table thead th,
|
| 512 |
+
#leaderboard-table table thead th,
|
| 513 |
+
#leaderboard-table th {
|
| 514 |
background: #f1f5f9 !important;
|
| 515 |
color: #334155 !important;
|
| 516 |
font-weight: 600 !important;
|
|
|
|
| 520 |
padding: 12px 16px !important;
|
| 521 |
border-bottom: 2px solid #e2e8f0 !important;
|
| 522 |
white-space: nowrap !important;
|
| 523 |
+
overflow: hidden !important;
|
| 524 |
+
text-overflow: ellipsis !important;
|
| 525 |
}
|
| 526 |
+
.table-wrap table tbody td,
|
| 527 |
+
#leaderboard-table table tbody td,
|
| 528 |
+
#leaderboard-table td {
|
| 529 |
padding: 10px 16px !important;
|
| 530 |
font-size: 0.88rem !important;
|
| 531 |
border-bottom: 1px solid #f1f5f9 !important;
|
| 532 |
white-space: nowrap !important;
|
| 533 |
+
overflow: hidden !important;
|
| 534 |
+
text-overflow: ellipsis !important;
|
| 535 |
}
|
| 536 |
+
.table-wrap table tbody tr:hover,
|
| 537 |
+
#leaderboard-table table tbody tr:hover {
|
| 538 |
background: #eff6ff !important;
|
| 539 |
}
|
| 540 |
+
/* Force horizontal layout for Gradio 6 dataframe cells */
|
| 541 |
+
#leaderboard-table .cell-wrap {
|
| 542 |
+
white-space: nowrap !important;
|
| 543 |
+
}
|
| 544 |
|
| 545 |
/* === Accordion (FAQ) === */
|
| 546 |
.faq-section .accordion {
|
|
|
|
| 1542 |
link_text_color_active="*primary_800",
|
| 1543 |
)
|
| 1544 |
|
| 1545 |
+
gr.set_static_paths(paths=["assets"])
|
| 1546 |
+
|
| 1547 |
with gr.Blocks(
|
| 1548 |
title="ST-WebAgentBench Leaderboard",
|
| 1549 |
theme=theme,
|
|
|
|
| 1607 |
interactive=False,
|
| 1608 |
label="Ranked by CuP (Completion under Policy)",
|
| 1609 |
elem_id="leaderboard-table",
|
| 1610 |
+
wrap=False,
|
| 1611 |
column_widths=["60px", "140px", "120px", "120px", "70px", "70px", "70px", "80px", "80px", "80px", "60px", "100px"],
|
| 1612 |
)
|
| 1613 |
|