A benchmark of novel, expert-level algorithmic problems over graphs that demand deep dynamic
programming and logical reasoning. Shallow and Deeper tiers span moderate through
challenging problems, while Deepest is research-level.
""",
elem_classes="markdown-text",
)
with gr.Column(scale=3, elem_id="landing-hero-right"):
learn_more_btn = gr.Button(
"Learn More about FormulaOne",
elem_id="learn-more-pill",
variant="secondary",
)
# Make the pill switch to the "What is FormulaOne" tab
learn_more_btn.click(
lambda: gr.Tabs(selected="what-is"), # switches tabs
inputs=None,
outputs=tabs, # 'tabs' is your Tabs handle
)
# Pill-style selector aligned to the top-right
with gr.Row(elem_id="f1-tier-select-row"):
tier_selector = gr.Radio(
choices=list(reversed(list(TIER_TOTALS.keys()))),
value="Deeper Tier",
label=None,
show_label=False,
elem_id="f1-tier-select",
)
accuracy_plot = gr.Plot(
value=_initial_accuracy_fig,
elem_id="f1-accuracy-plot",
show_label=False,
)
tier_selector.change(
lambda t: build_accuracy_figure(t),
inputs=tier_selector,
outputs=accuracy_plot,
)
# Footnote (sampling + prompt details)
gr.Markdown(
"""
All models were sampled with their highest available reasoning settings and a maximum token budget.
We also provided the models with a diverse few-shot prompt that is highly supportive for FormulaOne problems,
covering many of the subtle details of state design and maintenance, from a broad array of categories.
""",
elem_classes="markdown-text",
)
# Existing "What is FormulaOne" tab
with gr.TabItem("What is FormulaOne", id="what-is", elem_id="what-is-tab"):
gr.Image(
"assets/banner.png",
show_label=False,
elem_classes=["f1-image"],
show_share_button=False,
show_download_button=False,
show_fullscreen_button=False,
width=550,
)
# Top content and categories table
gr.HTML(WHAT_IS_F1_HTML_TOP)
# ---- Bottom content pieces interleaved with real Gradio media ----
# Up to and including the "An Infinite Well" heading
gr.HTML(WHAT_IS_F1_HTML_BOTTOM_A_BEFORE_TABS)
# ===== Examples (now right after the “Infinite Well” heading; inner width 710px via CSS) =====
with gr.Group(elem_id="f1-examples", elem_classes=["f1-container"]):
gr.HTML(
'Examples of FormulaOne problems
'
)
_latex = [
{"left": "$$", "right": "$$", "display": True},
{"left": "$", "right": "$", "display": False},
{"left": "\\(", "right": "\\)", "display": False},
{"left": "\\[", "right": "\\]", "display": True},
]
md_warmup = gr.Markdown(
value=(
'Brief explanation showcasing the design of a compressed dynamic programming state-space.
'
)
gr.HTML(WHAT_IS_F1_HTML_AFTER_VIDEO)
# Evaluation: Warmup figure
gr.HTML(WHAT_IS_F1_HTML_EVAL_BEFORE_WARMUPFIG, padding=False)
gr.Image(
"assets/perf_plot.png",
width=600,
show_label=False,
elem_classes=["f1-image"],
show_share_button=False,
show_download_button=False,
show_fullscreen_button=False,
)
gr.HTML('Performance of frontier models on the FormulaOne dataset.
')
# Tail after Deeper Tier fig
gr.HTML(WHAT_IS_F1_HTML_AFTER_TIER1FIG_TAIL)
# Rename tab to "Leaderboard" and cap at 800px width
with gr.TabItem("Leaderboard", elem_id="formulaone-leaderboard-tab-table", id=2):
gr.Markdown(
"""
Welcome to the FormulaOne leaderboard. This table tracks performance on the core FormulaOne benchmark, covering the **deeper** and **deepest** tiers (120 problems).
Use the 'Select Columns to Display' dropdown to customize your view, and the search bar to find specific models or organizations.
""",
elem_classes="markdown-text",
)
refresh_leaderboard_data()
assert leaderboard_df is not None
leaderboard_component = init_leaderboard(leaderboard_df)
with gr.TabItem("Submit Solutions", elem_id="formulaone-submit-tab-table", id=3):
logger.info("Tab submission")
with gr.Column():
with gr.Row():
gr.Markdown(EVALUATION_QUEUE_TEXT, elem_classes="markdown-text")
with gr.Row():
gr.Markdown("# ✉️✨ Submit your solutions", elem_classes="markdown-text")
gr.Markdown(SUBMISSION_TERMS_TEXT, elem_classes="markdown-text")
login_box = gr.Group(visible=True, elem_id="f1-login-box")
with login_box:
gr.Markdown("Please sign in with Hugging Face to submit")
gr.LoginButton(elem_id="hf-login-btn")
submit_panel = gr.Group(visible=False, elem_classes="markdown-text")
with submit_panel:
with gr.Row():
with gr.Column():
system_name_textbox = gr.Textbox(label=AutoEvalColumn.system.name)
org_textbox = gr.Textbox(label=AutoEvalColumn.organization.name)
submission_file = gr.File(label="JSONL solutions file", file_types=[".jsonl"])
# Required checkboxes
agreement_checkbox = gr.Checkbox(
label="I agree to the FormulaOne Submission Agreement (v1.2).",
value=False,
elem_classes="markdown-text",
)
privacy_checkbox = gr.Checkbox(
label="I have read the Privacy Notice.", value=False, elem_classes="markdown-text"
)
security_checkbox = gr.Checkbox(
label="I confirm this submission does not attempt to access private tests or exfiltrate data.",
value=False,
elem_classes="markdown-text",
)
privacy_link = "https://huggingface.co/spaces/double-ai/FormulaOne-Leaderboard/blob/main/docs/privacy-policy.md"
submission_agreement_link = "https://huggingface.co/spaces/double-ai/FormulaOne-Leaderboard/blob/main/terms/submission-agreement.md"
gr.Markdown(
f'