idolezal commited on
Commit
da3a7d3
1 Parent(s): ebb78cc

gradio_leaderboard

Browse files
Files changed (2) hide show
  1. app.py +15 -1
  2. requirements.txt +1 -0
app.py CHANGED
@@ -5,6 +5,7 @@ import gradio as gr
5
  import pandas as pd
6
  from gradio.themes.utils.sizes import text_md
7
  from gradio_modal import Modal
 
8
 
9
  from content import (
10
  HEADER_MARKDOWN,
@@ -487,9 +488,22 @@ def gradio_app():
487
  interactive=True,
488
  )
489
 
 
 
 
 
 
 
 
 
 
 
 
 
 
490
  with gr.Row():
491
  leaderboard_table = gr.DataFrame(
492
- leaderboard_server.get_leaderboard(category=leaderboard_server.TASKS_CATEGORY_OVERALL),
493
  interactive=False,
494
  label=None,
495
  visible=True,
 
5
  import pandas as pd
6
  from gradio.themes.utils.sizes import text_md
7
  from gradio_modal import Modal
8
+ from gradio_leaderboard import Leaderboard, ColumnFilter, SelectColumns
9
 
10
  from content import (
11
  HEADER_MARKDOWN,
 
488
  interactive=True,
489
  )
490
 
491
+ leaderboard_dataframe = leaderboard_server.get_leaderboard(category=leaderboard_server.TASKS_CATEGORY_OVERALL)
492
+
493
+ with gr.Row():
494
+ Leaderboard(
495
+ value=leaderboard_dataframe,
496
+ select_columns=["T", "Model", "Average ⬆️", "ARC",
497
+ "HellaSwag", "MMLU", "TruthfulQA",
498
+ "Winogrande", "GSM8K"],
499
+ search_columns=["model_name_for_query", "Type"],
500
+ hide_columns=["model_name_for_query", "Model Size"],
501
+ filter_columns=["T", "Precision", "Model Size"],
502
+ )
503
+
504
  with gr.Row():
505
  leaderboard_table = gr.DataFrame(
506
+ value=leaderboard_dataframe,
507
  interactive=False,
508
  label=None,
509
  visible=True,
requirements.txt CHANGED
@@ -10,4 +10,5 @@ numpy
10
  scikit-learn
11
  numba
12
  gradio-modal
 
13
  regex
 
10
  scikit-learn
11
  numba
12
  gradio-modal
13
+ gradio_leaderboard
14
  regex