sh1gechan commited on
Commit
96fd777
1 Parent(s): ce780cb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -0
app.py CHANGED
@@ -79,14 +79,27 @@ def update_table(
79
  show_flagged: bool,
80
  query: str,
81
  ):
 
 
 
82
  filtered_df = filter_models(hidden_df, type_query, size_query, precision_query, add_special_tokens_query, num_few_shots_query, show_deleted, show_merges, show_flagged)
 
 
83
  filtered_df = filter_queries(query, filtered_df)
 
 
84
  print(f"Filter applied: query={query}, columns={columns}, type_query={type_query}, precision_query={precision_query}")
 
 
85
 
86
  df = select_columns(filtered_df, columns)
 
 
 
87
  return df
88
 
89
 
 
90
  def load_query(request: gr.Request): # triggered only once at startup => read query parameter if it exists
91
  query = request.query_params.get("query") or ""
92
  return query, query # return one for the "search_bar", one for a hidden component that triggers a reload only if value has changed
 
79
  show_flagged: bool,
80
  query: str,
81
  ):
82
+ print(f"Update table called with: type_query={type_query}, precision_query={precision_query}, size_query={size_query}")
83
+ print(f"hidden_df shape before filtering: {hidden_df.shape}")
84
+
85
  filtered_df = filter_models(hidden_df, type_query, size_query, precision_query, add_special_tokens_query, num_few_shots_query, show_deleted, show_merges, show_flagged)
86
+ print(f"filtered_df shape after filter_models: {filtered_df.shape}")
87
+
88
  filtered_df = filter_queries(query, filtered_df)
89
+ print(f"filtered_df shape after filter_queries: {filtered_df.shape}")
90
+
91
  print(f"Filter applied: query={query}, columns={columns}, type_query={type_query}, precision_query={precision_query}")
92
+ print("Filtered dataframe head:")
93
+ print(filtered_df.head())
94
 
95
  df = select_columns(filtered_df, columns)
96
+ print(f"Final df shape: {df.shape}")
97
+ print("Final dataframe head:")
98
+ print(df.head())
99
  return df
100
 
101
 
102
+
103
  def load_query(request: gr.Request): # triggered only once at startup => read query parameter if it exists
104
  query = request.query_params.get("query") or ""
105
  return query, query # return one for the "search_bar", one for a hidden component that triggers a reload only if value has changed