Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update.
Browse files- app.py +20 -11
- src/display/css_html_js.py +6 -5
app.py
CHANGED
@@ -280,7 +280,13 @@ def build_accuracy_figure(tier: str):
|
|
280 |
template="plotly_white",
|
281 |
height=420,
|
282 |
margin=dict(l=30, r=120, t=10, b=40), # extra right room for legend
|
283 |
-
xaxis=dict(
|
|
|
|
|
|
|
|
|
|
|
|
|
284 |
yaxis=dict(
|
285 |
title="Accuracy (%)",
|
286 |
range=[0, 100], # fixed 0–100
|
@@ -333,8 +339,9 @@ with blocks:
|
|
333 |
'<header class="text-center mb-12"><h1 class="text-4xl md:text-5xl font-bold text-gray-900 f1-h1">FormulaOne</h1></header>'
|
334 |
)
|
335 |
with gr.Row(elem_id="landing-hero-row"):
|
336 |
-
gr.
|
337 |
-
|
|
|
338 |
<div class="f1-container">
|
339 |
<p class="f1-hero">
|
340 |
A benchmark of <strong>220</strong> novel, expert-level algorithmic problems over graphs that demand deep dynamic
|
@@ -343,19 +350,21 @@ with blocks:
|
|
343 |
</p>
|
344 |
</div>
|
345 |
""",
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
|
|
|
|
|
|
351 |
|
352 |
# Make the pill switch to the "What is FormulaOne" tab
|
353 |
learn_more_btn.click(
|
354 |
-
lambda: gr.Tabs(selected="what-is"), #
|
355 |
inputs=None,
|
356 |
-
outputs=tabs, # tabs
|
357 |
)
|
358 |
-
|
359 |
# Pill-style selector aligned to the top-right
|
360 |
with gr.Row(elem_id="f1-tier-select-row"):
|
361 |
tier_selector = gr.Radio(
|
|
|
280 |
template="plotly_white",
|
281 |
height=420,
|
282 |
margin=dict(l=30, r=120, t=10, b=40), # extra right room for legend
|
283 |
+
xaxis=dict(
|
284 |
+
title="Model Release Date",
|
285 |
+
type="date",
|
286 |
+
tickformat="%b %Y",
|
287 |
+
showgrid=True,
|
288 |
+
title_standoff=10, # small gap so the label doesn’t crowd the ticks
|
289 |
+
),
|
290 |
yaxis=dict(
|
291 |
title="Accuracy (%)",
|
292 |
range=[0, 100], # fixed 0–100
|
|
|
339 |
'<header class="text-center mb-12"><h1 class="text-4xl md:text-5xl font-bold text-gray-900 f1-h1">FormulaOne</h1></header>'
|
340 |
)
|
341 |
with gr.Row(elem_id="landing-hero-row"):
|
342 |
+
with gr.Column(scale=7, elem_id="landing-hero-left"):
|
343 |
+
gr.Markdown(
|
344 |
+
"""
|
345 |
<div class="f1-container">
|
346 |
<p class="f1-hero">
|
347 |
A benchmark of <strong>220</strong> novel, expert-level algorithmic problems over graphs that demand deep dynamic
|
|
|
350 |
</p>
|
351 |
</div>
|
352 |
""",
|
353 |
+
elem_classes="markdown-text",
|
354 |
+
)
|
355 |
+
with gr.Column(scale=3, elem_id="landing-hero-right"):
|
356 |
+
learn_more_btn = gr.Button(
|
357 |
+
"Learn More about FormulaOne",
|
358 |
+
elem_id="learn-more-pill",
|
359 |
+
variant="secondary",
|
360 |
+
)
|
361 |
|
362 |
# Make the pill switch to the "What is FormulaOne" tab
|
363 |
learn_more_btn.click(
|
364 |
+
lambda: gr.Tabs(selected="what-is"), # switches tabs
|
365 |
inputs=None,
|
366 |
+
outputs=tabs, # 'tabs' is your Tabs handle
|
367 |
)
|
|
|
368 |
# Pill-style selector aligned to the top-right
|
369 |
with gr.Row(elem_id="f1-tier-select-row"):
|
370 |
tier_selector = gr.Radio(
|
src/display/css_html_js.py
CHANGED
@@ -77,14 +77,15 @@ custom_css = """
|
|
77 |
margin-left: auto;
|
78 |
margin-right: auto;
|
79 |
margin-bottom: 8px;
|
80 |
-
justify-content: space-between;
|
81 |
align-items: center;
|
82 |
}
|
|
|
|
|
83 |
|
84 |
/* Blurb text */
|
85 |
.f1-hero { margin: 0; font-size: 1.02rem; color: var(--f1-text); }
|
86 |
|
87 |
-
/* Learn More pill — compact
|
88 |
#learn-more-pill,
|
89 |
#learn-more-pill button {
|
90 |
width: auto !important;
|
@@ -93,11 +94,11 @@ custom_css = """
|
|
93 |
color: #ffffff !important;
|
94 |
border: 0 !important;
|
95 |
border-radius: 999px !important;
|
96 |
-
padding: 6px 12px !important;
|
97 |
box-shadow: 0 1px 2px rgba(0,0,0,0.06) !important;
|
98 |
font-weight: 700 !important;
|
99 |
-
font-size: 0.95rem !important;
|
100 |
-
white-space: nowrap !important;
|
101 |
}
|
102 |
#learn-more-pill button:hover { filter: brightness(0.95) !important; }
|
103 |
|
|
|
77 |
margin-left: auto;
|
78 |
margin-right: auto;
|
79 |
margin-bottom: 8px;
|
|
|
80 |
align-items: center;
|
81 |
}
|
82 |
+
#landing-hero-left { padding-right: 8px; }
|
83 |
+
#landing-hero-right { display: flex; justify-content: flex-end; }
|
84 |
|
85 |
/* Blurb text */
|
86 |
.f1-hero { margin: 0; font-size: 1.02rem; color: var(--f1-text); }
|
87 |
|
88 |
+
/* Learn More pill — compact */
|
89 |
#learn-more-pill,
|
90 |
#learn-more-pill button {
|
91 |
width: auto !important;
|
|
|
94 |
color: #ffffff !important;
|
95 |
border: 0 !important;
|
96 |
border-radius: 999px !important;
|
97 |
+
padding: 6px 12px !important;
|
98 |
box-shadow: 0 1px 2px rgba(0,0,0,0.06) !important;
|
99 |
font-weight: 700 !important;
|
100 |
+
font-size: 0.95rem !important;
|
101 |
+
white-space: nowrap !important;
|
102 |
}
|
103 |
#learn-more-pill button:hover { filter: brightness(0.95) !important; }
|
104 |
|