Michael Rabinovich Cursor commited on
Commit ·
882faa0
1
Parent(s): 0eccd77
leaderboard: squeeze header/caption, grow gallery to show more rows
Browse files- Drop the gallery caption and collapse the Gradio title to a single
compact line, and cut the gallery body padding (removes the dead gap
between the last row and the Refresh button).
- With that freed vertical space, lower the box chrome reserve and raise
the cap so the gallery shows as many rows as fit in one viewport while
staying a single scroll (harness-verified across screen sizes).
Co-authored-by: Cursor <cursoragent@cursor.com>
- app.py +2 -4
- gallery.py +3 -9
app.py
CHANGED
|
@@ -932,10 +932,8 @@ def _tasks_iframe_html() -> str:
|
|
| 932 |
|
| 933 |
|
| 934 |
with gr.Blocks(title="CADGenBench Leaderboard", theme=gr.themes.Soft()) as blocks:
|
| 935 |
-
|
| 936 |
-
|
| 937 |
-
"_Benchmarking AI-driven CAD generation._"
|
| 938 |
-
)
|
| 939 |
|
| 940 |
with gr.Tab("Leaderboard"):
|
| 941 |
# Visual-first leaderboard. The bespoke surface (sticky GT row,
|
|
|
|
| 932 |
|
| 933 |
|
| 934 |
with gr.Blocks(title="CADGenBench Leaderboard", theme=gr.themes.Soft()) as blocks:
|
| 935 |
+
# Single compact title line (keeps vertical space for the gallery rows).
|
| 936 |
+
gr.Markdown("### CADGenBench Leaderboard")
|
|
|
|
|
|
|
| 937 |
|
| 938 |
with gr.Tab("Leaderboard"):
|
| 939 |
# Visual-first leaderboard. The bespoke surface (sticky GT row,
|
gallery.py
CHANGED
|
@@ -232,7 +232,7 @@ _CSS = """
|
|
| 232 |
body {
|
| 233 |
margin: 0; background: var(--bg); color: var(--ink);
|
| 234 |
font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
|
| 235 |
-
-webkit-font-smoothing: antialiased; padding:
|
| 236 |
}
|
| 237 |
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
|
| 238 |
|
|
@@ -409,12 +409,6 @@ _BODY = """
|
|
| 409 |
Validated leaderboard - Top 10
|
| 410 |
<span class="verified-pill"><span class="dot"></span>verified only</span>
|
| 411 |
</div>
|
| 412 |
-
<p class="section-caption">
|
| 413 |
-
A fixed comparison sheet: <b>two generation</b> and <b>two editing</b> samples,
|
| 414 |
-
one <b>Medium</b> and one <b>Hard</b> per task. Difficulty is fixed (picked from the
|
| 415 |
-
Claude Opus 4.8 baseline's per-sample scores), so every visit shows the same columns.
|
| 416 |
-
<b>Scroll the table</b> to see all models — the ground-truth row stays pinned for comparison.
|
| 417 |
-
</p>
|
| 418 |
<div class="gallery-shell">
|
| 419 |
<div class="gallery" id="gallery">
|
| 420 |
<div class="grid-head" id="gridHead"></div>
|
|
@@ -638,11 +632,11 @@ function updateScrollCue() {
|
|
| 638 |
// rather than the box plus an outer page scroll. Deliberately generous: a box
|
| 639 |
// that is a little short (a touch more in-box scrolling) is far better than a
|
| 640 |
// confusing second scrollbar.
|
| 641 |
-
var CHROME_RESERVE =
|
| 642 |
function sizeGalleryBox() {
|
| 643 |
try {
|
| 644 |
const avail = (window.screen && window.screen.availHeight) || 900;
|
| 645 |
-
const h = Math.max(
|
| 646 |
document.documentElement.style.setProperty('--gallery-max', h + 'px');
|
| 647 |
updateScrollCue();
|
| 648 |
} catch (e) { /* keep CSS fallback */ }
|
|
|
|
| 232 |
body {
|
| 233 |
margin: 0; background: var(--bg); color: var(--ink);
|
| 234 |
font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
|
| 235 |
+
-webkit-font-smoothing: antialiased; padding: 8px 0 10px;
|
| 236 |
}
|
| 237 |
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
|
| 238 |
|
|
|
|
| 409 |
Validated leaderboard - Top 10
|
| 410 |
<span class="verified-pill"><span class="dot"></span>verified only</span>
|
| 411 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 412 |
<div class="gallery-shell">
|
| 413 |
<div class="gallery" id="gallery">
|
| 414 |
<div class="grid-head" id="gridHead"></div>
|
|
|
|
| 632 |
// rather than the box plus an outer page scroll. Deliberately generous: a box
|
| 633 |
// that is a little short (a touch more in-box scrolling) is far better than a
|
| 634 |
// confusing second scrollbar.
|
| 635 |
+
var CHROME_RESERVE = 520;
|
| 636 |
function sizeGalleryBox() {
|
| 637 |
try {
|
| 638 |
const avail = (window.screen && window.screen.availHeight) || 900;
|
| 639 |
+
const h = Math.max(320, Math.min(1200, Math.round(avail - CHROME_RESERVE)));
|
| 640 |
document.documentElement.style.setProperty('--gallery-max', h + 'px');
|
| 641 |
updateScrollCue();
|
| 642 |
} catch (e) { /* keep CSS fallback */ }
|