Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
feat: enable the search bar and reranking selector
Browse files
app.py
CHANGED
@@ -122,17 +122,20 @@ with demo:
|
|
122 |
# datatype=TYPES,
|
123 |
visible=False,
|
124 |
)
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
|
|
|
|
|
|
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 |
|