Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Changed.
Browse files- app.py +11 -8
- src/about.py +23 -28
- src/display/css_html_js.py +40 -135
app.py
CHANGED
@@ -173,18 +173,21 @@ def gate_submission(oauth_token: gr.OAuthToken | None):
|
|
173 |
|
174 |
|
175 |
def get_theme():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
176 |
return "light"
|
177 |
|
178 |
|
179 |
blocks = gr.Blocks(
|
180 |
css=custom_css,
|
181 |
theme=get_theme(),
|
182 |
-
js="
|
183 |
-
// Force light everywhere
|
184 |
-
document.documentElement.setAttribute('data-theme', 'light');
|
185 |
-
document.documentElement.setAttribute('data-color-mode', 'light');
|
186 |
-
document.body.classList.remove('dark');
|
187 |
-
}""",
|
188 |
)
|
189 |
with blocks:
|
190 |
|
@@ -192,7 +195,8 @@ with blocks:
|
|
192 |
with gr.TabItem("What is FormulaOne", id=0):
|
193 |
gr.HTML(WHAT_IS_F1_HTML)
|
194 |
|
195 |
-
|
|
|
196 |
gr.Markdown(
|
197 |
"""
|
198 |
Welcome to the FormulaOne leaderboard. This table tracks the performance of various systems on the FormulaOne benchmark.
|
@@ -216,7 +220,6 @@ with blocks:
|
|
216 |
login_box = gr.Group(visible=True)
|
217 |
with login_box:
|
218 |
gr.Markdown("Please sign in with Hugging Face to submit")
|
219 |
-
# Give the login button a stable id so CSS can target it
|
220 |
gr.LoginButton(elem_id="hf-login-btn")
|
221 |
|
222 |
submit_panel = gr.Group(visible=False)
|
|
|
173 |
|
174 |
|
175 |
def get_theme():
|
176 |
+
# return gr.themes.Soft(
|
177 |
+
# primary_hue=gr.themes.colors.blue,
|
178 |
+
# secondary_hue=gr.themes.colors.sky,
|
179 |
+
# neutral_hue=gr.themes.colors.gray,
|
180 |
+
# ).set(
|
181 |
+
# body_background_fill="#FFFFFF",
|
182 |
+
# panel_background_fill="#f3f4f6",
|
183 |
+
# )
|
184 |
return "light"
|
185 |
|
186 |
|
187 |
blocks = gr.Blocks(
|
188 |
css=custom_css,
|
189 |
theme=get_theme(),
|
190 |
+
js="() => { document.body.classList.remove('dark'); document.documentElement.setAttribute('data-theme','light'); document.documentElement.setAttribute('data-color-mode','light'); }",
|
|
|
|
|
|
|
|
|
|
|
191 |
)
|
192 |
with blocks:
|
193 |
|
|
|
195 |
with gr.TabItem("What is FormulaOne", id=0):
|
196 |
gr.HTML(WHAT_IS_F1_HTML)
|
197 |
|
198 |
+
# (5) Rename tab to "Leaderboard"
|
199 |
+
with gr.TabItem("Leaderboard", elem_id="formulaone-leaderboard-tab-table", id=1):
|
200 |
gr.Markdown(
|
201 |
"""
|
202 |
Welcome to the FormulaOne leaderboard. This table tracks the performance of various systems on the FormulaOne benchmark.
|
|
|
220 |
login_box = gr.Group(visible=True)
|
221 |
with login_box:
|
222 |
gr.Markdown("Please sign in with Hugging Face to submit")
|
|
|
223 |
gr.LoginButton(elem_id="hf-login-btn")
|
224 |
|
225 |
submit_panel = gr.Group(visible=False)
|
src/about.py
CHANGED
@@ -17,7 +17,7 @@ WHAT_IS_F1_HTML = f"""
|
|
17 |
|
18 |
<p class="mb-4 f1-p"><strong>FormulaOne</strong> consists of 220 novel dynamic programming problems over graphs. The problems are organised into three categories, ranging from moderate difficulty and all the way up to research-level.</p>
|
19 |
|
20 |
-
<!--
|
21 |
<div class="f1-table-wrap">
|
22 |
<table class="f1-table" aria-label="FormulaOne categories">
|
23 |
<thead>
|
@@ -47,29 +47,29 @@ WHAT_IS_F1_HTML = f"""
|
|
47 |
</table>
|
48 |
</div>
|
49 |
|
50 |
-
<!--
|
51 |
<div class="mt-6 f1-tabs" id="f1-examples">
|
52 |
<div class="f1-tabs-body">
|
53 |
<h3 class="text-xl font-semibold mb-2" style="color:#111827;">Examples of FormulaOne problems</h3>
|
54 |
|
55 |
<div class="problem-panel" id="panel-warmup">
|
56 |
<div class="f1-problem-box">
|
57 |
-
<p class="
|
58 |
-
<p class="mb-2 f1-p"
|
59 |
</div>
|
60 |
</div>
|
61 |
|
62 |
<div class="problem-panel" id="panel-tier1" style="display:none;">
|
63 |
<div class="f1-problem-box">
|
64 |
-
<p class="
|
65 |
-
<p class="mb-2 f1-p"
|
66 |
</div>
|
67 |
</div>
|
68 |
|
69 |
<div class="problem-panel" id="panel-tier2" style="display:none;">
|
70 |
<div class="f1-problem-box">
|
71 |
-
<p class="
|
72 |
-
<p class="mb-2 f1-p"
|
73 |
</div>
|
74 |
</div>
|
75 |
</div>
|
@@ -81,7 +81,7 @@ WHAT_IS_F1_HTML = f"""
|
|
81 |
</div>
|
82 |
</div>
|
83 |
|
84 |
-
<p class="
|
85 |
|
86 |
<p class="f1-p">Despite <a href="https://epoch.ai/frontiermath" target="_blank" rel="noopener noreferrer" class="f1-a">impressive</a> <a href="https://artificialanalysis.ai/evaluations/gpqa-diamond" target="_blank" rel="noopener noreferrer" class="f1-a">performance</a> on existing benchmarks, presently <strong>no model solves even a single FormulaOne Tier 2 problem</strong>.<sup><a href="#evaluation" class="f1-a">1</a></sup></p>
|
87 |
</section>
|
@@ -89,10 +89,9 @@ WHAT_IS_F1_HTML = f"""
|
|
89 |
<section>
|
90 |
<h2 class="text-3xl font-bold text-gray-900 f1-h2">An “Infinite Well” of Problems</h2>
|
91 |
|
92 |
-
<!-- (5) Problem 44: LaTeX, with heading removed -->
|
93 |
<div class="f1-problem-box">
|
94 |
<p class="mb-2 f1-p"><strong>Input:</strong> A tree-like graph $G=(V,E)$, a tree decomposition $\\mathcal{{T}}$ of $G$, and a weight function $w: V \\to \\mathbb{{N}}$.</p>
|
95 |
-
<p class="mb-2 f1-p"><strong>
|
96 |
<p class="text-sm f1-p" style="color:#6b7280;"><strong>Notation:</strong> The weight of a set $S$ is defined as $w(S) \\triangleq \\sum_{{v\\in S}} w(v)$. Return the final result modulo $10^9+7$.</p>
|
97 |
</div>
|
98 |
|
@@ -158,24 +157,24 @@ WHAT_IS_F1_HTML = f"""
|
|
158 |
</section>
|
159 |
</main>
|
160 |
|
161 |
-
<!-- MathJax
|
162 |
<script>
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
document.head.appendChild(mj);
|
168 |
-
}}
|
169 |
</script>
|
|
|
|
|
170 |
|
|
|
171 |
<script>
|
172 |
-
// Because gr.HTML mounts asynchronously, wait a tick then wire up tabs.
|
173 |
setTimeout(() => {{
|
174 |
const tabs = [
|
175 |
-
{{button: document.getElementById('tab-warmup'), panel: document.getElementById('panel-warmup') }},
|
176 |
-
{{button: document.getElementById('tab-tier1'), panel: document.getElementById('panel-tier1') }},
|
177 |
-
{{button: document.getElementById('tab-tier2'), panel: document.getElementById('panel-tier2') }}
|
178 |
-
]
|
179 |
|
180 |
function selectTab(idx) {{
|
181 |
tabs.forEach((t, i) => {{
|
@@ -190,12 +189,9 @@ WHAT_IS_F1_HTML = f"""
|
|
190 |
}}
|
191 |
|
192 |
tabs.forEach((t, i) => {{
|
193 |
-
if (t.button)
|
194 |
-
t.button.addEventListener('click', () => selectTab(i));
|
195 |
-
}}
|
196 |
}});
|
197 |
|
198 |
-
// Initial state
|
199 |
selectTab(0);
|
200 |
}}, 120);
|
201 |
</script>
|
@@ -203,7 +199,6 @@ WHAT_IS_F1_HTML = f"""
|
|
203 |
</html>
|
204 |
"""
|
205 |
|
206 |
-
|
207 |
EVALUATION_QUEUE_TEXT = """
|
208 |
## Submitting to the FormulaOne Leaderboard
|
209 |
|
|
|
17 |
|
18 |
<p class="mb-4 f1-p"><strong>FormulaOne</strong> consists of 220 novel dynamic programming problems over graphs. The problems are organised into three categories, ranging from moderate difficulty and all the way up to research-level.</p>
|
19 |
|
20 |
+
<!-- Clean, centered table -->
|
21 |
<div class="f1-table-wrap">
|
22 |
<table class="f1-table" aria-label="FormulaOne categories">
|
23 |
<thead>
|
|
|
47 |
</table>
|
48 |
</div>
|
49 |
|
50 |
+
<!-- Compact bottom tabs -->
|
51 |
<div class="mt-6 f1-tabs" id="f1-examples">
|
52 |
<div class="f1-tabs-body">
|
53 |
<h3 class="text-xl font-semibold mb-2" style="color:#111827;">Examples of FormulaOne problems</h3>
|
54 |
|
55 |
<div class="problem-panel" id="panel-warmup">
|
56 |
<div class="f1-problem-box">
|
57 |
+
<p class="f1-problem-name">Union-of-Paths-and-Cycles</p>
|
58 |
+
<p class="mb-2 f1-p">Given a tree-like graph $G=(V,E)$, compute the sum of all weights of sets $S\\subseteq V$ such that the induced subgraph $G[S]$ is a disjoint union of paths and cycles.</p>
|
59 |
</div>
|
60 |
</div>
|
61 |
|
62 |
<div class="problem-panel" id="panel-tier1" style="display:none;">
|
63 |
<div class="f1-problem-box">
|
64 |
+
<p class="f1-problem-name">Maximal-Union-of-Paths-and-Cycles</p>
|
65 |
+
<p class="mb-2 f1-p">Given a tree-like graph $G=(V,E)$, compute the sum of all weights of sets $S\\subseteq V$ such that $G[S]$ is a disjoint union of paths and cycles and $S$ is maximal with respect to this property.</p>
|
66 |
</div>
|
67 |
</div>
|
68 |
|
69 |
<div class="problem-panel" id="panel-tier2" style="display:none;">
|
70 |
<div class="f1-problem-box">
|
71 |
+
<p class="f1-problem-name">Maximal-Union-of-Cycles</p>
|
72 |
+
<p class="mb-2 f1-p">Given a tree-like graph $G=(V,E)$, compute the sum of all weights of sets $S\\subseteq V$ such that $G[S]$ is a disjoint union of cycles and $S$ is maximal with respect to this property.</p>
|
73 |
</div>
|
74 |
</div>
|
75 |
</div>
|
|
|
81 |
</div>
|
82 |
</div>
|
83 |
|
84 |
+
<p class="mb-4 f1-p">The latter category is incredibly demanding, requiring resolution of many points of uncertainty, and involving an array of reasoning steps, including topological and geometric insight, knowledge of mathematical domains such as extremal graph theory and logic, combinatorial considerations, precise implementation, and more.</p>
|
85 |
|
86 |
<p class="f1-p">Despite <a href="https://epoch.ai/frontiermath" target="_blank" rel="noopener noreferrer" class="f1-a">impressive</a> <a href="https://artificialanalysis.ai/evaluations/gpqa-diamond" target="_blank" rel="noopener noreferrer" class="f1-a">performance</a> on existing benchmarks, presently <strong>no model solves even a single FormulaOne Tier 2 problem</strong>.<sup><a href="#evaluation" class="f1-a">1</a></sup></p>
|
87 |
</section>
|
|
|
89 |
<section>
|
90 |
<h2 class="text-3xl font-bold text-gray-900 f1-h2">An “Infinite Well” of Problems</h2>
|
91 |
|
|
|
92 |
<div class="f1-problem-box">
|
93 |
<p class="mb-2 f1-p"><strong>Input:</strong> A tree-like graph $G=(V,E)$, a tree decomposition $\\mathcal{{T}}$ of $G$, and a weight function $w: V \\to \\mathbb{{N}}$.</p>
|
94 |
+
<p class="mb-2 f1-p"><strong>Goal:</strong> Compute the sum of all weights of sets $S \\subseteq V$ such that the induced subgraph $G[S]$ contains no cycle of length four.</p>
|
95 |
<p class="text-sm f1-p" style="color:#6b7280;"><strong>Notation:</strong> The weight of a set $S$ is defined as $w(S) \\triangleq \\sum_{{v\\in S}} w(v)$. Return the final result modulo $10^9+7$.</p>
|
96 |
</div>
|
97 |
|
|
|
157 |
</section>
|
158 |
</main>
|
159 |
|
160 |
+
<!-- MathJax config FIRST (escaped {{ }}) -->
|
161 |
<script>
|
162 |
+
window.MathJax = {{
|
163 |
+
tex: {{ inlineMath: [['$', '$'], ['\\\\(', '\\\\)']] }},
|
164 |
+
options: {{ skipHtmlTags: ['script','noscript','style','textarea','pre','code'] }}
|
165 |
+
}};
|
|
|
|
|
166 |
</script>
|
167 |
+
<!-- Then load MathJax -->
|
168 |
+
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
|
169 |
|
170 |
+
<!-- Tabs JS: works + re-typesets -->
|
171 |
<script>
|
|
|
172 |
setTimeout(() => {{
|
173 |
const tabs = [
|
174 |
+
{{ button: document.getElementById('tab-warmup'), panel: document.getElementById('panel-warmup') }},
|
175 |
+
{{ button: document.getElementById('tab-tier1'), panel: document.getElementById('panel-tier1') }},
|
176 |
+
{{ button: document.getElementById('tab-tier2'), panel: document.getElementById('panel-tier2') }}
|
177 |
+
];
|
178 |
|
179 |
function selectTab(idx) {{
|
180 |
tabs.forEach((t, i) => {{
|
|
|
189 |
}}
|
190 |
|
191 |
tabs.forEach((t, i) => {{
|
192 |
+
if (t.button) t.button.addEventListener('click', () => selectTab(i));
|
|
|
|
|
193 |
}});
|
194 |
|
|
|
195 |
selectTab(0);
|
196 |
}}, 120);
|
197 |
</script>
|
|
|
199 |
</html>
|
200 |
"""
|
201 |
|
|
|
202 |
EVALUATION_QUEUE_TEXT = """
|
203 |
## Submitting to the FormulaOne Leaderboard
|
204 |
|
src/display/css_html_js.py
CHANGED
@@ -1,5 +1,4 @@
|
|
1 |
custom_css = """
|
2 |
-
/* Typography & readable width */
|
3 |
:root, [data-theme="light"] {
|
4 |
--f1-text: #111827;
|
5 |
--f1-subtle: #6b7280;
|
@@ -8,61 +7,32 @@ custom_css = """
|
|
8 |
--f1-bg-muted: #f9fafb;
|
9 |
}
|
10 |
|
11 |
-
/*
|
12 |
-
.f1-container {
|
13 |
-
|
14 |
-
margin: 0 auto;
|
15 |
-
padding: 0 16px;
|
16 |
-
}
|
17 |
|
18 |
-
/* Paragraphs
|
19 |
.f1-p, .f1-li {
|
20 |
line-height: 1.75;
|
21 |
color: #374151;
|
22 |
-
text-align: left;
|
23 |
-
text-wrap: pretty;
|
24 |
-
overflow-wrap: break-word;
|
25 |
-
hyphens: auto;
|
26 |
word-break: normal;
|
27 |
}
|
28 |
|
29 |
-
.markdown-text {
|
30 |
-
font-size: 16px !important;
|
31 |
-
max-width: 800px; /* match content width for markdown blocks too */
|
32 |
-
margin: 0 auto;
|
33 |
-
}
|
34 |
-
|
35 |
-
/* Banner image */
|
36 |
-
.banner_image { width: 75% !important; align-self: center !important; }
|
37 |
-
|
38 |
-
/* Tabs (Gradio) */
|
39 |
-
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@500;600&display=swap');
|
40 |
-
button[role="tab"] {
|
41 |
-
font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
|
42 |
-
letter-spacing: 0.2px;
|
43 |
-
font-weight: 600;
|
44 |
-
font-size: 18px !important;
|
45 |
-
}
|
46 |
-
.tab-buttons button { font-size: 18px; }
|
47 |
-
|
48 |
/* Headings */
|
49 |
-
.f1-h1 {
|
50 |
-
|
51 |
-
font-size: 2.25rem;
|
52 |
-
line-height: 2.5rem;
|
53 |
-
color: var(--f1-text);
|
54 |
-
text-align: center;
|
55 |
-
margin-bottom: 1.25rem !important; /* (1) reduce gap under main title */
|
56 |
-
}
|
57 |
-
.f1-h2 {
|
58 |
font-weight: 700;
|
59 |
border-bottom: 1px solid var(--f1-border);
|
60 |
-
padding-bottom: 0.
|
61 |
-
margin-top:
|
62 |
-
margin-bottom:
|
63 |
color: var(--f1-text);
|
64 |
-
font-size: 1.875rem
|
65 |
-
line-height:
|
66 |
}
|
67 |
|
68 |
/* Links */
|
@@ -70,71 +40,33 @@ button[role="tab"] {
|
|
70 |
.f1-a:hover { text-decoration: underline; }
|
71 |
|
72 |
/* Blockquote & problem box */
|
73 |
-
.f1-blockquote {
|
74 |
-
|
75 |
-
|
76 |
-
margin-left: 0;
|
77 |
-
font-style: italic;
|
78 |
-
color: #4b5563;
|
79 |
-
}
|
80 |
-
.f1-problem-box {
|
81 |
-
background-color: var(--f1-bg-muted);
|
82 |
-
border: 1px solid var(--f1-border);
|
83 |
-
border-radius: 8px;
|
84 |
-
padding: 16px;
|
85 |
-
margin-top: 16px;
|
86 |
-
margin-bottom: 16px;
|
87 |
-
box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.04);
|
88 |
-
}
|
89 |
-
.f1-problem-box strong { color: var(--f1-text); }
|
90 |
|
91 |
-
/*
|
92 |
-
.f1-
|
93 |
-
.f1-figcaption { margin-top: 0.5rem; font-size: 0.875rem; color: var(--f1-subtle); font-style: italic; }
|
94 |
-
|
95 |
-
/* (3) Minimal table styling */
|
96 |
-
.f1-table-wrap {
|
97 |
-
margin: 12px 0 8px 0;
|
98 |
-
}
|
99 |
.f1-table {
|
100 |
-
width: 100%;
|
101 |
border-collapse: collapse;
|
102 |
-
|
103 |
-
|
104 |
-
|
|
|
105 |
background: var(--f1-bg);
|
106 |
}
|
107 |
.f1-table th, .f1-table td {
|
108 |
-
padding:
|
109 |
-
border-bottom: 1px solid var(--f1-border);
|
110 |
text-align: left;
|
111 |
vertical-align: top;
|
112 |
}
|
113 |
-
.f1-table th {
|
114 |
-
font-weight: 600;
|
115 |
-
color: var(--f1-text);
|
116 |
-
background: #fff; /* ultra-minimal */
|
117 |
-
}
|
118 |
-
.f1-table tr:last-child td { border-bottom: none; }
|
119 |
|
120 |
-
/*
|
121 |
-
.f1-tabs {
|
122 |
-
|
123 |
-
|
124 |
-
background: var(--f1-bg);
|
125 |
-
}
|
126 |
-
.f1-tabs-body {
|
127 |
-
padding: 12px 14px 6px 14px;
|
128 |
-
}
|
129 |
-
.f1-tabs-buttons {
|
130 |
-
display: flex;
|
131 |
-
gap: 6px;
|
132 |
-
border-top: 1px solid var(--f1-border);
|
133 |
-
padding: 6px;
|
134 |
-
justify-content: flex-start;
|
135 |
-
}
|
136 |
.f1-tab-btn {
|
137 |
-
font: 500 13px/1
|
138 |
padding: 6px 10px;
|
139 |
border-radius: 6px;
|
140 |
border: 1px solid transparent;
|
@@ -142,47 +74,21 @@ button[role="tab"] {
|
|
142 |
color: #374151;
|
143 |
cursor: pointer;
|
144 |
}
|
145 |
-
.f1-tab-btn[aria-selected="true"] {
|
146 |
-
background: var(--f1-bg-muted);
|
147 |
-
border-color: var(--f1-border);
|
148 |
-
}
|
149 |
-
|
150 |
-
/* Category cards (kept for other use, not used in the table now) */
|
151 |
-
.f1-category-card {
|
152 |
-
display: block;
|
153 |
-
border-radius: 0.5rem;
|
154 |
-
border: 1px solid var(--f1-border);
|
155 |
-
padding: 1rem;
|
156 |
-
background-color: var(--f1-bg);
|
157 |
-
box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
|
158 |
-
}
|
159 |
|
160 |
-
/* Leaderboard width helpers (
|
161 |
-
#formulaone-leaderboard-tab-table .gr-row
|
162 |
-
#formulaone-leaderboard-tab-table .gr-column {
|
163 |
-
|
164 |
-
}
|
165 |
-
#formulaone-leaderboard-tab-table [data-testid="dropdown"] { width: 100% !important; }
|
166 |
-
#formulaone-leaderboard-tab-table input[type="text"] { width: 100% !important; }
|
167 |
|
168 |
-
/* Login button force light
|
169 |
-
#hf-login-btn,
|
170 |
-
#hf-login-btn button,
|
171 |
-
button[data-testid="login-button"],
|
172 |
-
[data-testid="login-button"] button,
|
173 |
-
div[data-testid="login-button"] > button {
|
174 |
background: #ffffff !important;
|
175 |
color: #1f2937 !important;
|
176 |
border: 1px solid var(--f1-border) !important;
|
177 |
box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.04) !important;
|
178 |
}
|
179 |
-
#hf-login-btn:hover,
|
180 |
-
#hf-login-btn button:hover,
|
181 |
-
button[data-testid="login-button"]:hover,
|
182 |
-
[data-testid="login-button"] button:hover,
|
183 |
-
div[data-testid="login-button"] > button:hover {
|
184 |
-
background: #f9fafb !important;
|
185 |
-
}
|
186 |
|
187 |
/* Misc existing */
|
188 |
#models-to-add-text { font-size: 18px !important; }
|
@@ -193,8 +99,7 @@ div[data-testid="login-button"] > button:hover {
|
|
193 |
#leaderboard-table-lite { margin-top: 15px }
|
194 |
#search-bar-table-box > div:first-child { background: none; border: none; }
|
195 |
#search-bar { padding: 0px; }
|
196 |
-
#leaderboard-table td:nth-child(2),
|
197 |
-
#leaderboard-table th:nth-child(2) { max-width: 400px; overflow: auto; white-space: nowrap; }
|
198 |
#scale-logo { border-style: none !important; box-shadow: none; display: block; margin-left: auto; margin-right: auto; max-width: 600px; }
|
199 |
#scale-logo .download { display: none; }
|
200 |
#filter_type{ border: 0; padding-left: 0; padding-top: 0; }
|
|
|
1 |
custom_css = """
|
|
|
2 |
:root, [data-theme="light"] {
|
3 |
--f1-text: #111827;
|
4 |
--f1-subtle: #6b7280;
|
|
|
7 |
--f1-bg-muted: #f9fafb;
|
8 |
}
|
9 |
|
10 |
+
/* Readable width */
|
11 |
+
.f1-container { max-width: 800px; margin: 0 auto; padding: 0 16px; } /* (2) */
|
12 |
+
.markdown-text { font-size: 16px !important; max-width: 800px; margin: 0 auto; }
|
|
|
|
|
|
|
13 |
|
14 |
+
/* Paragraphs: nice wrapping */
|
15 |
.f1-p, .f1-li {
|
16 |
line-height: 1.75;
|
17 |
color: #374151;
|
18 |
+
text-align: left; /* no huge gaps */
|
19 |
+
text-wrap: pretty;
|
20 |
+
overflow-wrap: break-word;
|
21 |
+
hyphens: auto;
|
22 |
word-break: normal;
|
23 |
}
|
24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
/* Headings */
|
26 |
+
.f1-h1 { font-weight: 700; font-size: 2.25rem; line-height: 2.5rem; color: var(--f1-text); text-align: center; margin-bottom: 1.25rem !important; }
|
27 |
+
.f1-h2 { /* (4) smaller section headings */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
font-weight: 700;
|
29 |
border-bottom: 1px solid var(--f1-border);
|
30 |
+
padding-bottom: 0.45rem;
|
31 |
+
margin-top: 1.75rem;
|
32 |
+
margin-bottom: 0.9rem;
|
33 |
color: var(--f1-text);
|
34 |
+
font-size: 1.5rem; /* was 1.875rem */
|
35 |
+
line-height: 2rem;
|
36 |
}
|
37 |
|
38 |
/* Links */
|
|
|
40 |
.f1-a:hover { text-decoration: underline; }
|
41 |
|
42 |
/* Blockquote & problem box */
|
43 |
+
.f1-blockquote { border-left: 4px solid #d1d5db; padding-left: 1rem; margin-left: 0; font-style: italic; color: #4b5563; }
|
44 |
+
.f1-problem-box { background-color: var(--f1-bg-muted); border: 1px solid var(--f1-border); border-radius: 8px; padding: 16px; margin-top: 16px; margin-bottom: 16px; box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.04); }
|
45 |
+
.f1-problem-name { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-weight: 600; text-align: center; } /* (7) */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
|
47 |
+
/* (1) Clean table: centered, auto width, only top & left bars */
|
48 |
+
.f1-table-wrap { margin: 10px auto 8px auto; text-align: center; }
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
.f1-table {
|
|
|
50 |
border-collapse: collapse;
|
51 |
+
width: auto; /* not full width */
|
52 |
+
margin: 0 auto; /* centered */
|
53 |
+
border-top: 1px solid var(--f1-border);
|
54 |
+
border-left: 1px solid var(--f1-border);
|
55 |
background: var(--f1-bg);
|
56 |
}
|
57 |
.f1-table th, .f1-table td {
|
58 |
+
padding: 8px 12px;
|
|
|
59 |
text-align: left;
|
60 |
vertical-align: top;
|
61 |
}
|
62 |
+
.f1-table th { font-weight: 600; color: var(--f1-text); }
|
|
|
|
|
|
|
|
|
|
|
63 |
|
64 |
+
/* Tabs: quiet, compact, with small gap after (3) */
|
65 |
+
.f1-tabs { border: 1px solid var(--f1-border); border-radius: 8px; background: var(--f1-bg); margin-bottom: 12px; } /* small spacing below */
|
66 |
+
.f1-tabs-body { padding: 12px 14px 6px 14px; }
|
67 |
+
.f1-tabs-buttons { display: flex; gap: 6px; border-top: 1px solid var(--f1-border); padding: 6px; justify-content: flex-start; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
.f1-tab-btn {
|
69 |
+
font: 500 13px/1 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
70 |
padding: 6px 10px;
|
71 |
border-radius: 6px;
|
72 |
border: 1px solid transparent;
|
|
|
74 |
color: #374151;
|
75 |
cursor: pointer;
|
76 |
}
|
77 |
+
.f1-tab-btn[aria-selected="true"] { background: var(--f1-bg-muted); border-color: var(--f1-border); }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
|
79 |
+
/* Leaderboard width helpers (6) */
|
80 |
+
#formulaone-leaderboard-tab-table .gr-column .gr-row .gr-column { width: 100% !important; } /* column -> row -> column chain */
|
81 |
+
#formulaone-leaderboard-tab-table .gr-row, #formulaone-leaderboard-tab-table .gr-column { max-width: 100% !important; }
|
82 |
+
#formulaone-leaderboard-tab-table [data-testid="dropdown"], #formulaone-leaderboard-tab-table input[type="text"] { width: 100% !important; }
|
|
|
|
|
|
|
83 |
|
84 |
+
/* Login button: force light */
|
85 |
+
#hf-login-btn, #hf-login-btn button, button[data-testid="login-button"], [data-testid="login-button"] button, div[data-testid="login-button"] > button {
|
|
|
|
|
|
|
|
|
86 |
background: #ffffff !important;
|
87 |
color: #1f2937 !important;
|
88 |
border: 1px solid var(--f1-border) !important;
|
89 |
box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.04) !important;
|
90 |
}
|
91 |
+
#hf-login-btn:hover, #hf-login-btn button:hover, button[data-testid="login-button"]:hover, [data-testid="login-button"] button:hover, div[data-testid="login-button"] > button:hover { background: #f9fafb !important; }
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
|
93 |
/* Misc existing */
|
94 |
#models-to-add-text { font-size: 18px !important; }
|
|
|
99 |
#leaderboard-table-lite { margin-top: 15px }
|
100 |
#search-bar-table-box > div:first-child { background: none; border: none; }
|
101 |
#search-bar { padding: 0px; }
|
102 |
+
#leaderboard-table td:nth-child(2), #leaderboard-table th:nth-child(2) { max-width: 400px; overflow: auto; white-space: nowrap; }
|
|
|
103 |
#scale-logo { border-style: none !important; box-shadow: none; display: block; margin-left: auto; margin-right: auto; max-width: 600px; }
|
104 |
#scale-logo .download { display: none; }
|
105 |
#filter_type{ border: 0; padding-left: 0; padding-top: 0; }
|