Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Commit
·
161f703
1
Parent(s):
6f32186
try new style
Browse files- app.py +23 -3
- src/display/css_html_js.py +10 -6
app.py
CHANGED
|
@@ -2,6 +2,7 @@ import gradio as gr
|
|
| 2 |
import pandas as pd
|
| 3 |
from apscheduler.schedulers.background import BackgroundScheduler
|
| 4 |
from gradio_leaderboard import ColumnFilter, Leaderboard, SelectColumns
|
|
|
|
| 5 |
from huggingface_hub import whoami
|
| 6 |
|
| 7 |
from src.about import CITATION_BUTTON_LABEL, CITATION_BUTTON_TEXT, EVALUATION_QUEUE_TEXT, INTRODUCTION_TEXT, TITLE
|
|
@@ -159,7 +160,26 @@ def gate_submission(profile: gr.OAuthProfile | None):
|
|
| 159 |
return gr.update(visible=False), gr.update(visible=True)
|
| 160 |
|
| 161 |
|
| 162 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 163 |
with blocks:
|
| 164 |
gr.Image(
|
| 165 |
"assets/banner.png",
|
|
@@ -194,12 +214,12 @@ with blocks:
|
|
| 194 |
gr.Markdown(INTRODUCTION_TEXT, elem_classes="markdown-text")
|
| 195 |
|
| 196 |
with gr.Tabs(elem_classes="tab-buttons") as tabs:
|
| 197 |
-
with gr.TabItem("🏅
|
| 198 |
refresh_leaderboard_data() # updates leaderboard_df
|
| 199 |
assert leaderboard_df is not None
|
| 200 |
leaderboard_component = init_leaderboard(leaderboard_df)
|
| 201 |
|
| 202 |
-
with gr.TabItem("🚀 Submit
|
| 203 |
logger.info("Tab submission")
|
| 204 |
with gr.Column():
|
| 205 |
with gr.Row():
|
|
|
|
| 2 |
import pandas as pd
|
| 3 |
from apscheduler.schedulers.background import BackgroundScheduler
|
| 4 |
from gradio_leaderboard import ColumnFilter, Leaderboard, SelectColumns
|
| 5 |
+
from gradio.themes import Base, colors, sizes
|
| 6 |
from huggingface_hub import whoami
|
| 7 |
|
| 8 |
from src.about import CITATION_BUTTON_LABEL, CITATION_BUTTON_TEXT, EVALUATION_QUEUE_TEXT, INTRODUCTION_TEXT, TITLE
|
|
|
|
| 160 |
return gr.update(visible=False), gr.update(visible=True)
|
| 161 |
|
| 162 |
|
| 163 |
+
cyber_theme = Base(
|
| 164 |
+
# neon-ish accents driven by hues (affects tabs, primary buttons, sliders, etc.)
|
| 165 |
+
primary_hue=colors.cyan, # selected tab / primary controls
|
| 166 |
+
secondary_hue=colors.pink, # secondary accents
|
| 167 |
+
neutral_hue=colors.gray, # keep neutrals subtle
|
| 168 |
+
# # techno font
|
| 169 |
+
# font=gr.themes.GoogleFont("Orbitron"),
|
| 170 |
+
font_mono=gr.themes.GoogleFont("JetBrains Mono"),
|
| 171 |
+
text_size=sizes.text_md, # keep defaults
|
| 172 |
+
spacing_size=sizes.spacing_md,
|
| 173 |
+
radius_size=sizes.radius_md,
|
| 174 |
+
).set(
|
| 175 |
+
# keep overrides minimal—dark canvas; let hues do the rest
|
| 176 |
+
body_background_fill="#0b0f14", # deep blue-black
|
| 177 |
+
background_fill_primary="#0b0f14", # panels
|
| 178 |
+
background_fill_secondary="#0e141a", # subtle contrast
|
| 179 |
+
)
|
| 180 |
+
|
| 181 |
+
|
| 182 |
+
blocks = gr.Blocks(css=custom_css, theme=cyber_theme)
|
| 183 |
with blocks:
|
| 184 |
gr.Image(
|
| 185 |
"assets/banner.png",
|
|
|
|
| 214 |
gr.Markdown(INTRODUCTION_TEXT, elem_classes="markdown-text")
|
| 215 |
|
| 216 |
with gr.Tabs(elem_classes="tab-buttons") as tabs:
|
| 217 |
+
with gr.TabItem("🏅 Leaderboard", elem_id="formulaone-leaderboar-tab-table", id=0):
|
| 218 |
refresh_leaderboard_data() # updates leaderboard_df
|
| 219 |
assert leaderboard_df is not None
|
| 220 |
leaderboard_component = init_leaderboard(leaderboard_df)
|
| 221 |
|
| 222 |
+
with gr.TabItem("🚀 Submit Solutions", elem_id="llm-benchmark-tab-table", id=2):
|
| 223 |
logger.info("Tab submission")
|
| 224 |
with gr.Column():
|
| 225 |
with gr.Row():
|
src/display/css_html_js.py
CHANGED
|
@@ -4,14 +4,18 @@ custom_css = """
|
|
| 4 |
font-size: 16px !important;
|
| 5 |
}
|
| 6 |
|
| 7 |
-
|
| 8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
}
|
| 10 |
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
font-size:
|
| 14 |
-
font-weight: 500;
|
| 15 |
}
|
| 16 |
|
| 17 |
#citation-button span {
|
|
|
|
| 4 |
font-size: 16px !important;
|
| 5 |
}
|
| 6 |
|
| 7 |
+
|
| 8 |
+
@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@500;600&display=swap');
|
| 9 |
+
|
| 10 |
+
.tab-buttons :is(.tab-nav, [role="tablist"]) > button[role="tab"] {
|
| 11 |
+
font-family: 'Exo 2', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
|
| 12 |
+
letter-spacing: 0.25px;
|
| 13 |
+
font-weight: 600;
|
| 14 |
}
|
| 15 |
|
| 16 |
+
|
| 17 |
+
#models-to-add-text {
|
| 18 |
+
font-size: 18px !important;
|
|
|
|
| 19 |
}
|
| 20 |
|
| 21 |
#citation-button span {
|