Spaces:
Paused
Paused
Amber Tanaka
commited on
Nav styling (#17)
Browse files- content.py +46 -7
- ui_components.py +2 -2
content.py
CHANGED
@@ -24,6 +24,7 @@ To support domain-specific insight, AstaBench also provides per-category leaderb
|
|
24 |
<br>
|
25 |
- End-to-End Discovery
|
26 |
<br>
|
|
|
27 |
Each category page includes a summary table (average score and cost per problem for that domain), as well as per-benchmark leaderboards for detailed comparisons on specific tasks.
|
28 |
<br>
|
29 |
<br>
|
@@ -100,11 +101,6 @@ CITATION_BUTTON_TEXT = r"""@article{asta-bench,
|
|
100 |
primaryClass={cs.AI},
|
101 |
secondaryClass={cs.CL}
|
102 |
}"""
|
103 |
-
# legend_tooltips = {
|
104 |
-
# "pareto": "The Pareto frontier represents optimal agents where you cannot improve score without increasing cost.",
|
105 |
-
# "openness": "Describes the accessibility of the agent's core model (e.g., Open, Closed, API).",
|
106 |
-
# "tooling": "Describes the tools an agent uses (e.g., Standard, Custom)."
|
107 |
-
# }
|
108 |
|
109 |
def format_error(msg):
|
110 |
return f"<p style='color: red; font-size: 20px; text-align: center;'>{msg}</p>"
|
@@ -143,6 +139,7 @@ def hf_uri_to_web_url(uri: str) -> str:
|
|
143 |
namespace, repo, path = parts
|
144 |
return f"https://huggingface.co/datasets/{namespace}/{repo}/tree/main/{path}"
|
145 |
|
|
|
146 |
css = """
|
147 |
#intro-paragraph {
|
148 |
font-size: 18px;
|
@@ -297,14 +294,12 @@ html:not(.dark) #legend-markdown .light-mode-icon,
|
|
297 |
#leaderboard-accordion {
|
298 |
overflow: visible !important;
|
299 |
}
|
300 |
-
|
301 |
.tooltip-icon {
|
302 |
display: inline-block;
|
303 |
margin-left: 6px;
|
304 |
cursor: help;
|
305 |
position: relative;
|
306 |
}
|
307 |
-
|
308 |
.tooltip-icon::after {
|
309 |
content: attr(data-tooltip);
|
310 |
position: absolute;
|
@@ -333,4 +328,48 @@ html:not(.dark) #legend-markdown .light-mode-icon,
|
|
333 |
cursor: help;
|
334 |
text-decoration: underline dotted 1px;
|
335 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
336 |
"""
|
|
|
24 |
<br>
|
25 |
- End-to-End Discovery
|
26 |
<br>
|
27 |
+
<br>
|
28 |
Each category page includes a summary table (average score and cost per problem for that domain), as well as per-benchmark leaderboards for detailed comparisons on specific tasks.
|
29 |
<br>
|
30 |
<br>
|
|
|
101 |
primaryClass={cs.AI},
|
102 |
secondaryClass={cs.CL}
|
103 |
}"""
|
|
|
|
|
|
|
|
|
|
|
104 |
|
105 |
def format_error(msg):
|
106 |
return f"<p style='color: red; font-size: 20px; text-align: center;'>{msg}</p>"
|
|
|
139 |
namespace, repo, path = parts
|
140 |
return f"https://huggingface.co/datasets/{namespace}/{repo}/tree/main/{path}"
|
141 |
|
142 |
+
|
143 |
css = """
|
144 |
#intro-paragraph {
|
145 |
font-size: 18px;
|
|
|
294 |
#leaderboard-accordion {
|
295 |
overflow: visible !important;
|
296 |
}
|
|
|
297 |
.tooltip-icon {
|
298 |
display: inline-block;
|
299 |
margin-left: 6px;
|
300 |
cursor: help;
|
301 |
position: relative;
|
302 |
}
|
|
|
303 |
.tooltip-icon::after {
|
304 |
content: attr(data-tooltip);
|
305 |
position: absolute;
|
|
|
328 |
cursor: help;
|
329 |
text-decoration: underline dotted 1px;
|
330 |
}
|
331 |
+
/* Main Nav bar styling */
|
332 |
+
.nav-holder nav {
|
333 |
+
display: grid !important;
|
334 |
+
grid-template-columns: auto auto auto auto 1fr auto auto !important;
|
335 |
+
gap: 10px 20px !important; /* Vertical and horizontal spacing */
|
336 |
+
width: 100% !important;
|
337 |
+
}
|
338 |
+
.nav-holder nav a[href*="/"] {
|
339 |
+
grid-row: 1 !important;
|
340 |
+
grid-column: 1 !important;
|
341 |
+
justify-self: start !important;
|
342 |
+
width: fit-content !important;
|
343 |
+
}
|
344 |
+
.nav-holder nav a[href*="about"] {
|
345 |
+
grid-row: 1 !important;
|
346 |
+
grid-column: 6 !important;
|
347 |
+
}
|
348 |
+
.nav-holder nav a[href*="submit"] {
|
349 |
+
grid-row: 1 !important;
|
350 |
+
grid-column: 7 !important;
|
351 |
+
}
|
352 |
+
.nav-holder nav a[href*="literature-understanding"] {
|
353 |
+
grid-row: 3 !important;
|
354 |
+
grid-column: 1 !important;
|
355 |
+
}
|
356 |
+
.nav-holder nav a[href*="code-execution"] {
|
357 |
+
grid-row: 3 !important;
|
358 |
+
grid-column: 2 !important;
|
359 |
+
}
|
360 |
+
.nav-holder nav a[href*="data-analysis"] {
|
361 |
+
grid-row: 3 !important;
|
362 |
+
grid-column: 3 !important;
|
363 |
+
}
|
364 |
+
.nav-holder nav a[href*="discovery"] {
|
365 |
+
grid-row: 3 !important;
|
366 |
+
grid-column: 4 !important;
|
367 |
+
}
|
368 |
+
.nav-holder nav::after {
|
369 |
+
content: ''; /* Required for pseudo-elements to appear */
|
370 |
+
background-color: #C9C9C3;
|
371 |
+
height: 1px;
|
372 |
+
grid-row: 2 !important;
|
373 |
+
grid-column: 1 / -1 !important;
|
374 |
+
}
|
375 |
"""
|
ui_components.py
CHANGED
@@ -333,7 +333,7 @@ def create_leaderboard_display(
|
|
333 |
|
334 |
plot_component = gr.Plot(
|
335 |
value=scatter_plot,
|
336 |
-
|
337 |
)
|
338 |
gr.HTML(SCATTER_DISCLAIMER, elem_id="scatter-disclaimer")
|
339 |
|
@@ -482,7 +482,7 @@ def create_benchmark_details_display(
|
|
482 |
y=benchmark_score_col,
|
483 |
agent_col="Agent"
|
484 |
)
|
485 |
-
gr.Plot(value=benchmark_plot)
|
486 |
gr.HTML(SCATTER_DISCLAIMER, elem_id="scatter-disclaimer")
|
487 |
# Put table and key into an accordion
|
488 |
with gr.Accordion("Details", open=True, elem_id="leaderboard-accordion"):
|
|
|
333 |
|
334 |
plot_component = gr.Plot(
|
335 |
value=scatter_plot,
|
336 |
+
show_label=False
|
337 |
)
|
338 |
gr.HTML(SCATTER_DISCLAIMER, elem_id="scatter-disclaimer")
|
339 |
|
|
|
482 |
y=benchmark_score_col,
|
483 |
agent_col="Agent"
|
484 |
)
|
485 |
+
gr.Plot(value=benchmark_plot, show_label=False)
|
486 |
gr.HTML(SCATTER_DISCLAIMER, elem_id="scatter-disclaimer")
|
487 |
# Put table and key into an accordion
|
488 |
with gr.Accordion("Details", open=True, elem_id="leaderboard-accordion"):
|