galb-dai commited on
Commit
cfae876
·
1 Parent(s): ccde03e
Files changed (3) hide show
  1. app.py +7 -0
  2. src/about.py +14 -24
  3. src/display/css_html_js.py +21 -6
app.py CHANGED
@@ -192,6 +192,13 @@ with blocks:
192
  gr.HTML(WHAT_IS_F1_HTML)
193
 
194
  with gr.TabItem("FormulaOne Leaderboard", elem_id="formulaone-leaderboard-tab-table", id=1):
 
 
 
 
 
 
 
195
  refresh_leaderboard_data()
196
  assert leaderboard_df is not None
197
  leaderboard_component = init_leaderboard(leaderboard_df)
 
192
  gr.HTML(WHAT_IS_F1_HTML)
193
 
194
  with gr.TabItem("FormulaOne Leaderboard", elem_id="formulaone-leaderboard-tab-table", id=1):
195
+ gr.Markdown(
196
+ """
197
+ Welcome to the FormulaOne leaderboard. This table tracks the performance of various systems on the FormulaOne benchmark.
198
+ Use the "Select Columns to Display" dropdown to customize your view, and the search bar to find specific models or organizations.
199
+ """,
200
+ elem_classes="markdown-text",
201
+ )
202
  refresh_leaderboard_data()
203
  assert leaderboard_df is not None
204
  leaderboard_component = init_leaderboard(leaderboard_df)
src/about.py CHANGED
@@ -14,30 +14,20 @@ WHAT_IS_F1_HTML = f"""
14
  <p class="text-lg mb-4 f1-p">We believe that existing benchmarks fail to capture the deep reasoning skills required for complex, research-level algorithmic problems. To address this gap, <a href="{PAPER_URL}" target="_blank" rel="noopener noreferrer" class="f1-a">we introduce <strong>FormulaOne</strong></a>.</p>
15
  <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>
16
 
17
- <!-- Nicely Styled Table -->
18
- <div class="overflow-hidden overflow-x-auto rounded-lg border border-gray-200 my-8">
19
- <table class="min-w-full divide-y divide-gray-200 text-sm">
20
- <thead class="bg-gray-100">
21
- <tr>
22
- <th class="whitespace-nowrap px-4 py-2 text-left font-medium text-gray-900">Category</th>
23
- <th class="whitespace-nowrap px-4 py-2 text-left font-medium text-gray-900">Description</th>
24
- </tr>
25
- </thead>
26
- <tbody class="divide-y divide-gray-200">
27
- <tr>
28
- <td class="whitespace-nowrap px-4 py-2 font-medium text-gray-900"><strong>FormulaOne Warmup</strong></td>
29
- <td class="whitespace-nowrap px-4 py-2 text-gray-700">A set of 100 “easier” problems.</td>
30
- </tr>
31
- <tr>
32
- <td class="whitespace-nowrap px-4 py-2 font-medium text-gray-900"><strong>FormulaOne Tier 1</strong></td>
33
- <td class="whitespace-nowrap px-4 py-2 text-gray-700">A set of 100 challenging problems.</td>
34
- </tr>
35
- <tr>
36
- <td class="whitespace-nowrap px-4 py-2 font-medium text-gray-900"><strong>FormulaOne Tier 2</strong></td>
37
- <td class="whitespace-nowrap px-4 py-2 text-gray-700">A set of 20 highly challenging problems.</td>
38
- </tr>
39
- </tbody>
40
- </table>
41
  </div>
42
 
43
  <!-- Tabbed Problem Viewer -->
 
14
  <p class="text-lg mb-4 f1-p">We believe that existing benchmarks fail to capture the deep reasoning skills required for complex, research-level algorithmic problems. To address this gap, <a href="{PAPER_URL}" target="_blank" rel="noopener noreferrer" class="f1-a">we introduce <strong>FormulaOne</strong></a>.</p>
15
  <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>
16
 
17
+ <!-- Nicely Styled Card Layout for Categories -->
18
+ <div class="my-8 grid grid-cols-1 gap-4 sm:grid-cols-3 text-center">
19
+ <div class="f1-category-card">
20
+ <h3 class="text-lg font-bold text-gray-900">FormulaOne Warmup</h3>
21
+ <p class="mt-1 text-sm text-gray-600">A set of 100 “easier” problems.</p>
22
+ </div>
23
+ <div class="f1-category-card">
24
+ <h3 class="text-lg font-bold text-gray-900">FormulaOne Tier 1</h3>
25
+ <p class="mt-1 text-sm text-gray-600">A set of 100 challenging problems.</p>
26
+ </div>
27
+ <div class="f1-category-card">
28
+ <h3 class="text-lg font-bold text-gray-900">FormulaOne Tier 2</h3>
29
+ <p class="mt-1 text-sm text-gray-600">A set of 20 highly challenging problems.</p>
30
+ </div>
 
 
 
 
 
 
 
 
 
 
31
  </div>
32
 
33
  <!-- Tabbed Problem Viewer -->
src/display/css_html_js.py CHANGED
@@ -1,5 +1,3 @@
1
- # src/display/css_html_js.py
2
-
3
  custom_css = """
4
  .markdown-text {
5
  font-size: 16px !important;
@@ -36,7 +34,7 @@ button[role="tab"] {
36
  #box-filter > .form{ border: 0 }
37
 
38
  /* Light Theme Styles for the "What is FormulaOne" HTML content */
39
- .f1-h1 { font-weight: 700; font-size: 2.25rem; line-height: 2.5rem; color: #111827; text-align: center; margin-bottom: 3rem;}
40
  .f1-h2 { font-weight: 700; border-bottom: 1px solid #e5e7eb; padding-bottom: 0.5rem; margin-top: 2.5rem; margin-bottom: 1.5rem; color: #111827; font-size: 1.875rem; line-height: 2.25rem; }
41
  .f1-p, .f1-li { line-height: 1.75; color: #374151; }
42
  .f1-a { color: #2563eb; text-decoration: none; font-weight: 500; }
@@ -44,12 +42,29 @@ button[role="tab"] {
44
  .f1-blockquote { border-left: 4px solid #d1d5db; padding-left: 1rem; margin-left: 0; font-style: italic; color: #4b5563; }
45
  .f1-problem-box { background-color: #f9fafb; border: 1px solid #e5e7eb; border-radius: 0.5rem; padding: 1.5rem; margin-top: 1.5rem; margin-bottom: 1.5rem; box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); }
46
  .f1-problem-box strong { color: #111827; }
47
- .f1-table { width: 100%; margin-top: 1.5rem; border-collapse: collapse; }
48
- .f1-th, .f1-td { text-align: left; padding: 0.75rem 1rem; border-bottom: 1px solid #e5e7eb; }
49
- .f1-th { background-color: #f9fafb; font-weight: 600; color: #374151; }
50
  .f1-figure { margin-top: 1.5rem; margin-bottom: 1.5rem; text-align: center; }
51
  .f1-figcaption { margin-top: 0.5rem; font-size: 0.875rem; color: #6b7280; font-style: italic; }
52
  .problem-tab-button { cursor: pointer; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
  """
54
 
55
  get_window_url_params = """
 
 
 
1
  custom_css = """
2
  .markdown-text {
3
  font-size: 16px !important;
 
34
  #box-filter > .form{ border: 0 }
35
 
36
  /* Light Theme Styles for the "What is FormulaOne" HTML content */
37
+ .f1-h1 { font-weight: 700; font-size: 2.25rem; line-height: 2.5rem; color: #111827; text-align: center; margin-bottom: 3rem !important;}
38
  .f1-h2 { font-weight: 700; border-bottom: 1px solid #e5e7eb; padding-bottom: 0.5rem; margin-top: 2.5rem; margin-bottom: 1.5rem; color: #111827; font-size: 1.875rem; line-height: 2.25rem; }
39
  .f1-p, .f1-li { line-height: 1.75; color: #374151; }
40
  .f1-a { color: #2563eb; text-decoration: none; font-weight: 500; }
 
42
  .f1-blockquote { border-left: 4px solid #d1d5db; padding-left: 1rem; margin-left: 0; font-style: italic; color: #4b5563; }
43
  .f1-problem-box { background-color: #f9fafb; border: 1px solid #e5e7eb; border-radius: 0.5rem; padding: 1.5rem; margin-top: 1.5rem; margin-bottom: 1.5rem; box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); }
44
  .f1-problem-box strong { color: #111827; }
 
 
 
45
  .f1-figure { margin-top: 1.5rem; margin-bottom: 1.5rem; text-align: center; }
46
  .f1-figcaption { margin-top: 0.5rem; font-size: 0.875rem; color: #6b7280; font-style: italic; }
47
  .problem-tab-button { cursor: pointer; }
48
+
49
+ /* New styles for the category cards */
50
+ .f1-category-card {
51
+ display: block;
52
+ border-radius: 0.5rem;
53
+ border: 1px solid #e5e7eb;
54
+ padding: 1rem;
55
+ background-color: white;
56
+ box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
57
+ }
58
+
59
+ /* Override for the dark Login Button */
60
+ div[data-testid="login-button"] > button {
61
+ background: #ffffff !important;
62
+ color: #374151 !important;
63
+ border: 1px solid #d1d5db !important;
64
+ }
65
+ div[data-testid="login-button"] > button:hover {
66
+ background: #f9fafb !important;
67
+ }
68
  """
69
 
70
  get_window_url_params = """