Spaces:
Running
Running
BenchmarkBot
commited on
Commit
•
6bc8c31
1
Parent(s):
8af7268
fix submit query
Browse files
app.py
CHANGED
@@ -68,24 +68,21 @@ def get_benchmark_df(benchmark):
|
|
68 |
# return gr.Tabs.update(selected=0)
|
69 |
|
70 |
|
71 |
-
def submit_query(text, backends, datatypes, threshold,
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
filtered_dfs.append(filtered_df)
|
87 |
-
|
88 |
-
return filtered_dfs
|
89 |
|
90 |
|
91 |
# Define demo interface
|
|
|
68 |
# return gr.Tabs.update(selected=0)
|
69 |
|
70 |
|
71 |
+
def submit_query(text, backends, datatypes, threshold, raw_df):
|
72 |
+
|
73 |
+
# extract the average score (float) from the clickable score (clickable markdown)
|
74 |
+
# raw_df["Average H4 Score ⬆️"] = raw_df["Average H4 Score ⬆️"].apply(
|
75 |
+
# extract_score_from_clickable)
|
76 |
+
filtered_df = raw_df[
|
77 |
+
raw_df["Model 🤗"].str.contains(text) &
|
78 |
+
raw_df["Backend 🏭"].isin(backends) &
|
79 |
+
raw_df["Datatype 📥"].isin(datatypes) &
|
80 |
+
(raw_df["Average H4 Score ⬆️"] >= threshold)
|
81 |
+
]
|
82 |
+
# filtered_df["Average H4 Score ⬆️"] = filtered_df["Average H4 Score ⬆️"].apply(
|
83 |
+
# make_clickable_score)
|
84 |
+
|
85 |
+
return filtered_df
|
|
|
|
|
|
|
86 |
|
87 |
|
88 |
# Define demo interface
|