sh1gechan commited on
Commit
a1f813a
1 Parent(s): 419aeaf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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
- shown_columns: list,
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, shown_columns)
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={shown_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, shown_columns)
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