mgyigit commited on
Commit
c939ef1
1 Parent(s): 0fd41d7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -53,18 +53,19 @@ with block:
53
  with gr.Tabs(elem_classes="tab-buttons") as tabs:
54
  with gr.TabItem("🏅 PROBE Leaderboard", elem_id="probe-benchmark-tab-table", id=1):
55
 
56
-
57
- method_names = pd.read_csv(CSV_RESULT_PATH)['method_name'].unique().tolist()
58
- metric_names = pd.read_csv(CSV_RESULT_PATH).columns.tolist()
 
59
  metrics_with_method = metric_names.copy()
60
  metric_names.remove('method_name') # Remove method_name from the metric options
61
 
62
  # Leaderboard section with method and metric selectors
63
  leaderboard_method_selector = gr.CheckboxGroup(
64
- choices=method_names, label="Select Methods for Leaderboard", value=method_names, interactive=True
65
  )
66
  leaderboard_metric_selector = gr.CheckboxGroup(
67
- choices=metric_names, label="Select Metrics for Leaderboard", value=metric_names, interactive=True
68
  )
69
 
70
  # Display the filtered leaderboard
 
53
  with gr.Tabs(elem_classes="tab-buttons") as tabs:
54
  with gr.TabItem("🏅 PROBE Leaderboard", elem_id="probe-benchmark-tab-table", id=1):
55
 
56
+ leaderboard = get_baseline_df(None, None) #get baseline leaderboard without filtering
57
+
58
+ method_names = leaderboard['method_name'].unique().tolist()
59
+ metric_names = leaderboard(CSV_RESULT_PATH).columns.tolist()
60
  metrics_with_method = metric_names.copy()
61
  metric_names.remove('method_name') # Remove method_name from the metric options
62
 
63
  # Leaderboard section with method and metric selectors
64
  leaderboard_method_selector = gr.CheckboxGroup(
65
+ choices=method_names, label="Select Methods for the Leaderboard", value=method_names, interactive=True
66
  )
67
  leaderboard_metric_selector = gr.CheckboxGroup(
68
+ choices=metric_names, label="Select Metrics for the Leaderboard", value=metric_names, interactive=True
69
  )
70
 
71
  # Display the filtered leaderboard