ClΓ©mentine commited on
Commit
ab6f548
β€’
1 Parent(s): 3dfaf22

simplify launcher + remove dataframe warning on boolean columns

Browse files
Files changed (1) hide show
  1. app.py +18 -77
app.py CHANGED
@@ -129,8 +129,8 @@ def filter_models(
129
  filtered_df = df[df[AutoEvalColumn.still_on_hub.name] == True]
130
 
131
  type_emoji = [t[0] for t in type_query]
132
- filtered_df = filtered_df[df[AutoEvalColumn.model_type_symbol.name].isin(type_emoji)]
133
- filtered_df = filtered_df[df[AutoEvalColumn.precision.name].isin(precision_query + ["None"])]
134
 
135
  numeric_interval = pd.IntervalIndex(sorted([NUMERIC_INTERVALS[s] for s in size_query]))
136
  params_column = pd.to_numeric(df[AutoEvalColumn.params.name], errors="coerce")
@@ -234,81 +234,22 @@ with demo:
234
  leaderboard_table,
235
  concurrency_limit=None,
236
  )
237
- shown_columns.change(
238
- update_table,
239
- [
240
- hidden_leaderboard_table_for_search,
241
- shown_columns,
242
- filter_columns_type,
243
- filter_columns_precision,
244
- filter_columns_size,
245
- deleted_models_visibility,
246
- search_bar,
247
- ],
248
- leaderboard_table,
249
- queue=True,
250
- concurrency_limit=None,
251
- )
252
- filter_columns_type.change(
253
- update_table,
254
- [
255
- hidden_leaderboard_table_for_search,
256
- shown_columns,
257
- filter_columns_type,
258
- filter_columns_precision,
259
- filter_columns_size,
260
- deleted_models_visibility,
261
- search_bar,
262
- ],
263
- leaderboard_table,
264
- queue=True,
265
- concurrency_limit=None,
266
- )
267
- filter_columns_precision.change(
268
- update_table,
269
- [
270
- hidden_leaderboard_table_for_search,
271
- shown_columns,
272
- filter_columns_type,
273
- filter_columns_precision,
274
- filter_columns_size,
275
- deleted_models_visibility,
276
- search_bar,
277
- ],
278
- leaderboard_table,
279
- queue=True,
280
- concurrency_limit=None,
281
- )
282
- filter_columns_size.change(
283
- update_table,
284
- [
285
- hidden_leaderboard_table_for_search,
286
- shown_columns,
287
- filter_columns_type,
288
- filter_columns_precision,
289
- filter_columns_size,
290
- deleted_models_visibility,
291
- search_bar,
292
- ],
293
- leaderboard_table,
294
- queue=True,
295
- concurrency_limit=None,
296
- )
297
- deleted_models_visibility.change(
298
- update_table,
299
- [
300
- hidden_leaderboard_table_for_search,
301
- shown_columns,
302
- filter_columns_type,
303
- filter_columns_precision,
304
- filter_columns_size,
305
- deleted_models_visibility,
306
- search_bar,
307
- ],
308
- leaderboard_table,
309
- queue=True,
310
- concurrency_limit=None,
311
- )
312
 
313
  with gr.TabItem("πŸ“ˆ Metrics through time", elem_id="llm-benchmark-tab-table", id=4):
314
  with gr.Row():
 
129
  filtered_df = df[df[AutoEvalColumn.still_on_hub.name] == True]
130
 
131
  type_emoji = [t[0] for t in type_query]
132
+ filtered_df = filtered_df.loc[df[AutoEvalColumn.model_type_symbol.name].isin(type_emoji)]
133
+ filtered_df = filtered_df.loc[df[AutoEvalColumn.precision.name].isin(precision_query + ["None"])]
134
 
135
  numeric_interval = pd.IntervalIndex(sorted([NUMERIC_INTERVALS[s] for s in size_query]))
136
  params_column = pd.to_numeric(df[AutoEvalColumn.params.name], errors="coerce")
 
234
  leaderboard_table,
235
  concurrency_limit=None,
236
  )
237
+ for selector in [shown_columns, filter_columns_type, filter_columns_precision, filter_columns_size, deleted_models_visibility]:
238
+ selector.change(
239
+ update_table,
240
+ [
241
+ hidden_leaderboard_table_for_search,
242
+ shown_columns,
243
+ filter_columns_type,
244
+ filter_columns_precision,
245
+ filter_columns_size,
246
+ deleted_models_visibility,
247
+ search_bar,
248
+ ],
249
+ leaderboard_table,
250
+ queue=True,
251
+ concurrency_limit=None,
252
+ )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
253
 
254
  with gr.TabItem("πŸ“ˆ Metrics through time", elem_id="llm-benchmark-tab-table", id=4):
255
  with gr.Row():