BenchmarkBot commited on
Commit
c796580
β€’
1 Parent(s): 804d27e

added multi hardware

Browse files
Files changed (1) hide show
  1. app.py +34 -32
app.py CHANGED
@@ -207,9 +207,9 @@ def filter_query(
207
 
208
 
209
  # Dataframes
210
- single_A100_df = get_benchmark_df(benchmark="1xA100-80GB")
211
- single_A100_table = get_benchmark_table(single_A100_df)
212
- single_A100_plot = get_benchmark_plot(single_A100_df)
213
 
214
  # Demo interface
215
  demo = gr.Blocks(css=custom_css)
@@ -283,28 +283,36 @@ with demo:
283
  )
284
 
285
  # leaderboard tabs
286
- with gr.Tabs(elem_classes="tab-buttons") as tabs:
287
- with gr.TabItem("πŸ–₯️ A100-80GB Leaderboard πŸ†", id=0):
288
- gr.HTML(SINGLE_A100_TEXT)
289
-
290
- # Original leaderboard table
291
- single_A100_leaderboard = gr.components.Dataframe(
292
- value=single_A100_table,
293
- datatype=COLUMNS_DATATYPES,
294
- headers=list(COLUMNS_MAPPING.values()),
295
- elem_id="1xA100-table",
296
- )
297
-
298
- with gr.TabItem("πŸ–₯️ A100-80GB Plot πŸ“Š", id=1):
299
- # Original leaderboard plot
300
- gr.HTML(SINGLE_A100_TEXT)
 
 
 
 
 
 
 
 
 
301
 
302
- # Original leaderboard plot
303
- single_A100_plotly = gr.components.Plot(
304
- value=single_A100_plot,
305
- elem_id="1xA100-plot",
306
- show_label=False,
307
- )
308
 
309
  filter_button.click(
310
  filter_query,
@@ -316,7 +324,7 @@ with demo:
316
  score_slider,
317
  memory_slider,
318
  ],
319
- [single_A100_leaderboard, single_A100_plotly],
320
  )
321
 
322
  with gr.Row():
@@ -327,13 +335,7 @@ with demo:
327
  elem_id="citation-button",
328
  ).style(show_copy_button=True)
329
 
330
- dummy = gr.Textbox(visible=False)
331
- demo.load(
332
- change_tab,
333
- dummy,
334
- tabs,
335
- _js=custom_js,
336
- )
337
 
338
 
339
  # Restart space every hour
 
207
 
208
 
209
  # Dataframes
210
+ A100_df = get_benchmark_df(benchmark="1xA100-80GB")
211
+ A100_table = get_benchmark_table(A100_df)
212
+ A100_plot = get_benchmark_plot(A100_df)
213
 
214
  # Demo interface
215
  demo = gr.Blocks(css=custom_css)
 
283
  )
284
 
285
  # leaderboard tabs
286
+ with gr.Tabs(elem_classes="hardware-tabs"):
287
+ with gr.TabItem("πŸ–₯️ A100-80GB πŸ–₯️", id=0):
288
+ with gr.Tabs(elem_classes="A100-tabs") as A100_tabs:
289
+ with gr.TabItem("πŸ… Leaderboard πŸ†", id=0):
290
+ gr.HTML(SINGLE_A100_TEXT)
291
+
292
+ # Original leaderboard table
293
+ A100_leaderboard = gr.components.Dataframe(
294
+ value=A100_table,
295
+ datatype=COLUMNS_DATATYPES,
296
+ headers=list(COLUMNS_MAPPING.values()),
297
+ elem_id="1xA100-table",
298
+ )
299
+
300
+ with gr.TabItem("πŸ“‰ Plot πŸ“Š", id=1):
301
+ # Original leaderboard plot
302
+ gr.HTML(SINGLE_A100_TEXT)
303
+
304
+ # Original leaderboard plot
305
+ A100_plotly = gr.components.Plot(
306
+ value=A100_plot,
307
+ elem_id="1xA100-plot",
308
+ show_label=False,
309
+ )
310
 
311
+ demo.load(
312
+ change_tab,
313
+ A100_tabs,
314
+ _js=custom_js,
315
+ )
 
316
 
317
  filter_button.click(
318
  filter_query,
 
324
  score_slider,
325
  memory_slider,
326
  ],
327
+ [A100_leaderboard, A100_plotly],
328
  )
329
 
330
  with gr.Row():
 
335
  elem_id="citation-button",
336
  ).style(show_copy_button=True)
337
 
338
+
 
 
 
 
 
 
339
 
340
 
341
  # Restart space every hour