Spaces:
AIR-Bench
/
Running on CPU Upgrade

nan commited on
Commit
61eca2d
1 Parent(s): f8b3d0f

feat: enable the search bar and reranking selector

Browse files
Files changed (2) hide show
  1. app.py +14 -11
  2. utils.py +1 -1
app.py CHANGED
@@ -122,17 +122,20 @@ with demo:
122
  # datatype=TYPES,
123
  visible=False,
124
  )
125
- # search_bar.submit(
126
- # update_table,
127
- # [
128
- # hidden_leaderboard_table_for_search,
129
- # shown_columns,
130
- # selected_rerankings,
131
- # search_bar,
132
- # ],
133
- # leaderboard_table,
134
- # )
135
- for selector in [selected_domains, selected_langs]:
 
 
 
136
  selector.change(
137
  update_table,
138
  [
 
122
  # datatype=TYPES,
123
  visible=False,
124
  )
125
+ search_bar.submit(
126
+ update_table,
127
+ [
128
+ hidden_leaderboard_table_for_search,
129
+ selected_domains,
130
+ selected_langs,
131
+ selected_rerankings,
132
+ search_bar,
133
+ ],
134
+ leaderboard_table,
135
+ )
136
+ for selector in [
137
+ selected_domains, selected_langs, selected_rerankings
138
+ ]:
139
  selector.change(
140
  update_table,
141
  [
utils.py CHANGED
@@ -54,7 +54,7 @@ def select_columns(df: pd.DataFrame, domain_query: list, language_query: list) -
54
  selected_cols.append(c)
55
  # We use COLS to maintain sorting
56
  filtered_df = df[always_here_cols + selected_cols]
57
- filtered_df[AutoEvalColumnQA.average.name] = filtered_df[selected_cols].mean(axis=1)
58
  return filtered_df
59
 
60
 
 
54
  selected_cols.append(c)
55
  # We use COLS to maintain sorting
56
  filtered_df = df[always_here_cols + selected_cols]
57
+ filtered_df[AutoEvalColumnQA.average.name] = filtered_df[selected_cols].mean(axis=1).round(decimals=2)
58
  return filtered_df
59
 
60