Commit
25509f3
1 Parent(s): 4159f5f

update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -71,12 +71,12 @@ with demo:
71
  gr.Markdown("No evaluations have been performed yet. The leaderboard is currently empty.")
72
  else:
73
  default_selection = [col.name for col in COLUMNS if col.displayed_by_default]
74
- print("Default Selection before ensuring 'model':", default_selection) # Debug
75
 
76
- # Ensure "model" is included
77
- if "model" not in default_selection:
78
- default_selection.insert(0, "model")
79
- print("Default Selection after ensuring 'model':", default_selection) # Debug
80
 
81
  leaderboard = Leaderboard(
82
  value=LEADERBOARD_DF,
@@ -86,7 +86,7 @@ with demo:
86
  cant_deselect=[col.name for col in COLUMNS if col.never_hidden],
87
  label="Select Columns to Display:",
88
  ),
89
- search_columns=[col.name for col in COLUMNS if col.name in ["model", "license"]],
90
  hide_columns=[col.name for col in COLUMNS if col.hidden],
91
  filter_columns=[
92
  ColumnFilter("model_type", type="checkboxgroup", label="Model types"),
@@ -180,4 +180,4 @@ with demo:
180
  scheduler = BackgroundScheduler()
181
  scheduler.add_job(restart_space, "interval", seconds=1800)
182
  scheduler.start()
183
- demo.queue(default_concurrency_limit=40).launch()
 
71
  gr.Markdown("No evaluations have been performed yet. The leaderboard is currently empty.")
72
  else:
73
  default_selection = [col.name for col in COLUMNS if col.displayed_by_default]
74
+ print("Default Selection before ensuring 'model_name':", default_selection) # Debug
75
 
76
+ # Ensure "model_name" is included
77
+ if "model_name" not in default_selection:
78
+ default_selection.insert(0, "model_name")
79
+ print("Default Selection after ensuring 'model_name':", default_selection) # Debug
80
 
81
  leaderboard = Leaderboard(
82
  value=LEADERBOARD_DF,
 
86
  cant_deselect=[col.name for col in COLUMNS if col.never_hidden],
87
  label="Select Columns to Display:",
88
  ),
89
+ search_columns=[col.name for col in COLUMNS if col.name in ["model_name", "license"]], # Updated to 'model_name'
90
  hide_columns=[col.name for col in COLUMNS if col.hidden],
91
  filter_columns=[
92
  ColumnFilter("model_type", type="checkboxgroup", label="Model types"),
 
180
  scheduler = BackgroundScheduler()
181
  scheduler.add_job(restart_space, "interval", seconds=1800)
182
  scheduler.start()
183
+ demo.queue(default_concurrency_limit=40).launch()