margsli commited on
Commit
c071d80
β€’
1 Parent(s): 0e619a7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -13
app.py CHANGED
@@ -32,13 +32,6 @@ Total #models: **{total_models}**.{space} Last updated: June 1, 2024.
32
  """
33
  return leaderboard_md
34
 
35
- def make_category_arena_leaderboard_md(arena_df, arena_subset_df, name="Overall"):
36
- total_models = len(arena_df)
37
- total_subset_models = len(arena_subset_df)
38
- leaderboard_md = f"""### {cat_name_to_explanation[name]}
39
- #### [Coverage] {space} #models: **{total_subset_models} ({round(total_subset_models/total_models *100)}%)**{space}
40
- """
41
- return leaderboard_md
42
 
43
 
44
  def make_leaderboard_md_live(elo_results):
@@ -144,9 +137,6 @@ def build_leaderboard_tab(results_file, leaderboard_table_file, show_plot=False)
144
  with gr.Row():
145
  with gr.Column(scale=2):
146
  category_dropdown = gr.Dropdown(choices=list(arena_dfs.keys()), label="Category", value="Overall")
147
- default_category_details = make_category_arena_leaderboard_md(arena_df, arena_df, name="Overall")
148
- with gr.Column(scale=4, variant="panel"):
149
- category_deets = gr.Markdown(default_category_details, elem_id="category_deets")
150
 
151
  display_df = gr.Dataframe(
152
  headers=[
@@ -233,10 +223,9 @@ def build_leaderboard_tab(results_file, leaderboard_table_file, show_plot=False)
233
  column_widths=[70, 190, 110, 110, 110, 150],
234
  wrap=True,
235
  )
236
- leaderboard_md = make_category_arena_leaderboard_md(arena_df, arena_subset_df, name=category)
237
- return arena_values, leaderboard_md
238
 
239
- category_dropdown.change(update_leaderboard_and_plots, inputs=[category_dropdown], outputs=[display_df, category_deets])
240
 
241
  with gr.Accordion(
242
  "πŸ“ Citation",
 
32
  """
33
  return leaderboard_md
34
 
 
 
 
 
 
 
 
35
 
36
 
37
  def make_leaderboard_md_live(elo_results):
 
137
  with gr.Row():
138
  with gr.Column(scale=2):
139
  category_dropdown = gr.Dropdown(choices=list(arena_dfs.keys()), label="Category", value="Overall")
 
 
 
140
 
141
  display_df = gr.Dataframe(
142
  headers=[
 
223
  column_widths=[70, 190, 110, 110, 110, 150],
224
  wrap=True,
225
  )
226
+ return arena_values
 
227
 
228
+ category_dropdown.change(update_leaderboard_and_plots, inputs=[category_dropdown], outputs=[display_df])
229
 
230
  with gr.Accordion(
231
  "πŸ“ Citation",