Spaces:
Running
Running
fix
Browse files
app.py
CHANGED
@@ -54,9 +54,11 @@ gradio_df = compute_df()
|
|
54 |
def refresh(model_query_regex):
|
55 |
if not model_query_regex:
|
56 |
return gradio_df
|
|
|
|
|
57 |
|
58 |
# filter the dataframe based on regex
|
59 |
-
return
|
60 |
|
61 |
# refresh button and precompute
|
62 |
# gr.Interface(fn=compute_df, title="Results Leaderboard", inputs=None, outputs="dataframe").launch()
|
|
|
54 |
def refresh(model_query_regex):
|
55 |
if not model_query_regex:
|
56 |
return gradio_df
|
57 |
+
|
58 |
+
df = gradio_df.dataframe
|
59 |
|
60 |
# filter the dataframe based on regex
|
61 |
+
return gr.Dataframe(df[df["model"].str.contains(model_query_regex, flags=re.IGNORECASE, regex=True)])
|
62 |
|
63 |
# refresh button and precompute
|
64 |
# gr.Interface(fn=compute_df, title="Results Leaderboard", inputs=None, outputs="dataframe").launch()
|