Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
@@ -68,7 +68,7 @@ leaderboard_df = original_df.copy()
|
|
68 |
# Searching and filtering
|
69 |
def update_table(
|
70 |
hidden_df: pd.DataFrame,
|
71 |
-
|
72 |
type_query: list,
|
73 |
precision_query: list,
|
74 |
size_query: list,
|
@@ -84,18 +84,18 @@ def update_table(
|
|
84 |
|
85 |
filtered_df = filter_models(hidden_df, type_query, size_query, precision_query,
|
86 |
add_special_tokens_query, num_few_shots_query,
|
87 |
-
show_deleted, show_merges, show_flagged
|
88 |
print(f"filtered_df shape after filter_models: {filtered_df.shape}")
|
89 |
|
90 |
if query:
|
91 |
filtered_df = filter_queries(query, filtered_df)
|
92 |
print(f"filtered_df shape after filter_queries: {filtered_df.shape}")
|
93 |
|
94 |
-
print(f"Filter applied: query={query}, columns={
|
95 |
print("Filtered dataframe head:")
|
96 |
print(filtered_df.head())
|
97 |
|
98 |
-
return select_columns(filtered_df,
|
99 |
|
100 |
|
101 |
def load_query(request: gr.Request): # triggered only once at startup => read query parameter if it exists
|
|
|
68 |
# Searching and filtering
|
69 |
def update_table(
|
70 |
hidden_df: pd.DataFrame,
|
71 |
+
columns: list,
|
72 |
type_query: list,
|
73 |
precision_query: list,
|
74 |
size_query: list,
|
|
|
84 |
|
85 |
filtered_df = filter_models(hidden_df, type_query, size_query, precision_query,
|
86 |
add_special_tokens_query, num_few_shots_query,
|
87 |
+
show_deleted, show_merges, show_flagged)
|
88 |
print(f"filtered_df shape after filter_models: {filtered_df.shape}")
|
89 |
|
90 |
if query:
|
91 |
filtered_df = filter_queries(query, filtered_df)
|
92 |
print(f"filtered_df shape after filter_queries: {filtered_df.shape}")
|
93 |
|
94 |
+
print(f"Filter applied: query={query}, columns={columns}, type_query={type_query}, precision_query={precision_query}")
|
95 |
print("Filtered dataframe head:")
|
96 |
print(filtered_df.head())
|
97 |
|
98 |
+
return select_columns(filtered_df, columns)
|
99 |
|
100 |
|
101 |
def load_query(request: gr.Request): # triggered only once at startup => read query parameter if it exists
|