Spaces:
Running
Running
Jae-Won Chung
commited on
Commit
•
46f6b9d
1
Parent(s):
332f235
Add new online demo tab
Browse files
app.py
CHANGED
@@ -331,12 +331,12 @@ with block:
|
|
331 |
gr.HTML("<h1><a href='https://ml.energy' class='text-logo'>ML.ENERGY</a> Leaderboard</h1>")
|
332 |
|
333 |
with gr.Tabs():
|
334 |
-
# Tab
|
335 |
with gr.Tab("Leaderboard"):
|
336 |
with gr.Box():
|
337 |
gr.HTML(intro_text)
|
338 |
|
339 |
-
# Block
|
340 |
with gr.Row():
|
341 |
with gr.Box():
|
342 |
gr.Markdown("### Benchmark results to show")
|
@@ -345,7 +345,7 @@ with block:
|
|
345 |
# Specifying `value` makes everything checked by default.
|
346 |
checkboxes.append(gr.CheckboxGroup(choices=choices, value=choices[:1], label=key))
|
347 |
|
348 |
-
# Block
|
349 |
with gr.Row():
|
350 |
dataframe = gr.Dataframe(type="pandas", elem_id="tab-leaderboard")
|
351 |
# Make sure the models have clickable links.
|
@@ -354,7 +354,7 @@ with block:
|
|
354 |
for checkbox in checkboxes:
|
355 |
checkbox.change(TableManager.set_filter_get_df, inputs=[tbm, *checkboxes], outputs=dataframe)
|
356 |
|
357 |
-
# Block
|
358 |
with gr.Box():
|
359 |
gr.Markdown("### Add custom columns to the table")
|
360 |
with gr.Row():
|
@@ -398,7 +398,7 @@ with block:
|
|
398 |
outputs=[colname_input, formula_input, add_col_message],
|
399 |
)
|
400 |
|
401 |
-
# Block
|
402 |
with gr.Box():
|
403 |
gr.Markdown("### Scatter plot (Hover over marker to show model name)")
|
404 |
with gr.Row():
|
@@ -447,11 +447,15 @@ with block:
|
|
447 |
outputs=[*axis_dropdowns, plot, plot_width_input, plot_height_input, plot_message],
|
448 |
)
|
449 |
|
450 |
-
# Block
|
451 |
with gr.Row():
|
452 |
gr.HTML(f"<h3 style='color: gray'>Last updated: {current_date}</h3>")
|
453 |
|
454 |
-
# Tab
|
|
|
|
|
|
|
|
|
455 |
with gr.Tab("About"):
|
456 |
# Read in LEADERBOARD.md
|
457 |
gr.Markdown(open("LEADERBOARD.md").read())
|
|
|
331 |
gr.HTML("<h1><a href='https://ml.energy' class='text-logo'>ML.ENERGY</a> Leaderboard</h1>")
|
332 |
|
333 |
with gr.Tabs():
|
334 |
+
# Tab: Leaderboard.
|
335 |
with gr.Tab("Leaderboard"):
|
336 |
with gr.Box():
|
337 |
gr.HTML(intro_text)
|
338 |
|
339 |
+
# Block: Checkboxes to select benchmarking parameters.
|
340 |
with gr.Row():
|
341 |
with gr.Box():
|
342 |
gr.Markdown("### Benchmark results to show")
|
|
|
345 |
# Specifying `value` makes everything checked by default.
|
346 |
checkboxes.append(gr.CheckboxGroup(choices=choices, value=choices[:1], label=key))
|
347 |
|
348 |
+
# Block: Leaderboard table.
|
349 |
with gr.Row():
|
350 |
dataframe = gr.Dataframe(type="pandas", elem_id="tab-leaderboard")
|
351 |
# Make sure the models have clickable links.
|
|
|
354 |
for checkbox in checkboxes:
|
355 |
checkbox.change(TableManager.set_filter_get_df, inputs=[tbm, *checkboxes], outputs=dataframe)
|
356 |
|
357 |
+
# Block: Allow users to add new columns.
|
358 |
with gr.Box():
|
359 |
gr.Markdown("### Add custom columns to the table")
|
360 |
with gr.Row():
|
|
|
398 |
outputs=[colname_input, formula_input, add_col_message],
|
399 |
)
|
400 |
|
401 |
+
# Block: Allow users to plot 2D and 3D scatter plots.
|
402 |
with gr.Box():
|
403 |
gr.Markdown("### Scatter plot (Hover over marker to show model name)")
|
404 |
with gr.Row():
|
|
|
447 |
outputs=[*axis_dropdowns, plot, plot_width_input, plot_height_input, plot_message],
|
448 |
)
|
449 |
|
450 |
+
# Block: Leaderboard date.
|
451 |
with gr.Row():
|
452 |
gr.HTML(f"<h3 style='color: gray'>Last updated: {current_date}</h3>")
|
453 |
|
454 |
+
# Tab: Online demo.
|
455 |
+
with gr.Tab("Online demo (Coming in August!)"):
|
456 |
+
gr.Markdown("# Online demo with real time energy measurements\n\nComing soon in August!")
|
457 |
+
|
458 |
+
# Tab: About page.
|
459 |
with gr.Tab("About"):
|
460 |
# Read in LEADERBOARD.md
|
461 |
gr.Markdown(open("LEADERBOARD.md").read())
|