Spaces:
Running
Running
BenchmarkBot
commited on
Commit
β’
53e3aab
1
Parent(s):
3d79a97
fix search
Browse files
app.py
CHANGED
@@ -60,13 +60,10 @@ def change_tab(query_param):
|
|
60 |
return gr.Tabs.update(selected=0)
|
61 |
|
62 |
|
63 |
-
def
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
filtered_dfs.append(filtered_df)
|
68 |
-
|
69 |
-
return filtered_dfs
|
70 |
|
71 |
|
72 |
def filter_table(df, backends):
|
@@ -149,10 +146,11 @@ with demo:
|
|
149 |
max_rows=None,
|
150 |
visible=False,
|
151 |
)
|
|
|
152 |
search_bar.submit(
|
153 |
-
|
154 |
-
[
|
155 |
-
[
|
156 |
)
|
157 |
# backend_checkboxes.select(
|
158 |
# filter_table,
|
|
|
60 |
return gr.Tabs.update(selected=0)
|
61 |
|
62 |
|
63 |
+
def search_tables(single_df, multi_df, query):
|
64 |
+
filtered_single = single_df[single_df["Model π€"].str.contains(query)]
|
65 |
+
filtered_multi = multi_df[multi_df["Model π€"].str.contains(query)]
|
66 |
+
return filtered_single, filtered_multi
|
|
|
|
|
|
|
67 |
|
68 |
|
69 |
def filter_table(df, backends):
|
|
|
146 |
max_rows=None,
|
147 |
visible=False,
|
148 |
)
|
149 |
+
|
150 |
search_bar.submit(
|
151 |
+
search_tables,
|
152 |
+
[single_A100_for_search, multi_A100_for_search, search_bar],
|
153 |
+
[single_A100_leaderboard, multi_A100_leaderboard],
|
154 |
)
|
155 |
# backend_checkboxes.select(
|
156 |
# filter_table,
|