xinchen9 commited on
Commit
95c165a
1 Parent(s): b81e7ca

[Update]Put all table in loop

Browse files
Files changed (1) hide show
  1. app.py +14 -127
app.py CHANGED
@@ -257,149 +257,36 @@ with demo:
257
 
258
  gr.Markdown(name)
259
  df_results = load_data(csv_path)
 
260
  leaderboard_table = gr.components.Dataframe(
261
  value = df_results,
262
  datatype = TYPES,
263
  elem_id = "leaderboard-table",
264
  interactive = False,
265
  visible=True,
266
- )
267
-
268
-
269
- hidden_leaderboard_table_for_search = gr.components.Dataframe(
270
- value=df_results_init,
271
- # elem_id="leaderboard-table",
272
- interactive=False,
273
- visible=False,
274
- )
275
-
276
- search_bar.submit(
277
- update_table,
278
- [
279
- # df_avg,
280
- hidden_leaderboard_table_for_search,
281
- model1_column,
282
- # shown_columns,
283
- #type_query,
284
- #open_query,
285
- # filter_columns_type,
286
- # filter_columns_precision,
287
- # filter_columns_size,
288
- # deleted_models_visibility,
289
- search_bar,
290
- ],
291
- leaderboard_table,
292
- )
293
- gr.Markdown("### Unlearned Concepts Parachute")
294
- leaderboard_table = gr.components.Dataframe(
295
- value = df_results,
296
- datatype = TYPES,
297
- elem_id = "leaderboard-table",
298
- interactive = False,
299
- visible=True,
300
- )
301
-
302
-
303
- hidden_leaderboard_table_for_search = gr.components.Dataframe(
304
- value=df_results_init,
305
- # elem_id="leaderboard-table",
306
- interactive=False,
307
- visible=False,
308
- )
309
-
310
- search_bar.submit(
311
- update_table,
312
- [
313
- # df_avg,
314
- hidden_leaderboard_table_for_search,
315
- model1_column,
316
- # shown_columns,
317
- #type_query,
318
- #open_query,
319
- # filter_columns_type,
320
- # filter_columns_precision,
321
- # filter_columns_size,
322
- # deleted_models_visibility,
323
- search_bar,
324
- ],
325
- leaderboard_table,
326
- )
327
-
328
- #for selector in [type_query, open_query]:
329
- for selector in [model1_column]:
330
- selector.change(
331
- update_table,
332
- [
333
- # df_avg,
334
- hidden_leaderboard_table_for_search,
335
- model1_column,
336
- # shown_columns,
337
- #type_query,
338
- #open_query,
339
- # filter_columns_type,
340
- # filter_columns_precision,
341
- # filter_columns_size,
342
- # deleted_models_visibility,
343
- search_bar,
344
- ],
345
- leaderboard_table,
346
  )
347
 
348
- gr.Markdown("### Unlearned Concepts Parachute")
349
- leaderboard_table = gr.components.Dataframe(
350
- value = df_results,
351
- datatype = TYPES,
352
- elem_id = "leaderboard-table",
353
- interactive = False,
354
- visible=True,
355
- )
356
-
357
-
358
- hidden_leaderboard_table_for_search = gr.components.Dataframe(
359
- value=df_results_init,
360
- # elem_id="leaderboard-table",
361
- interactive=False,
362
- visible=False,
363
- )
364
-
365
- search_bar.submit(
366
- update_table,
367
- [
368
- # df_avg,
369
- hidden_leaderboard_table_for_search,
370
- model1_column,
371
- # shown_columns,
372
- #type_query,
373
- #open_query,
374
- # filter_columns_type,
375
- # filter_columns_precision,
376
- # filter_columns_size,
377
- # deleted_models_visibility,
378
- search_bar,
379
- ],
380
- leaderboard_table,
381
- )
382
-
383
- #for selector in [type_query, open_query]:
384
- for selector in [model1_column]:
385
- selector.change(
386
  update_table,
387
  [
388
- # df_avg,
389
  hidden_leaderboard_table_for_search,
390
  model1_column,
391
- # shown_columns,
392
- #type_query,
393
- #open_query,
394
- # filter_columns_type,
395
- # filter_columns_precision,
396
- # filter_columns_size,
397
- # deleted_models_visibility,
398
  search_bar,
399
  ],
400
  leaderboard_table,
401
  )
402
-
 
 
 
403
 
404
 
405
  with gr.Row():
 
257
 
258
  gr.Markdown(name)
259
  df_results = load_data(csv_path)
260
+ df_results_init = df_results.copy()[show_columns]
261
  leaderboard_table = gr.components.Dataframe(
262
  value = df_results,
263
  datatype = TYPES,
264
  elem_id = "leaderboard-table",
265
  interactive = False,
266
  visible=True,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
267
  )
268
 
269
+
270
+ hidden_leaderboard_table_for_search = gr.components.Dataframe(
271
+ value=df_results_init,
272
+ interactive=False,
273
+ visible=False,
274
+ )
275
+
276
+ search_bar.submit(
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
277
  update_table,
278
  [
279
+
280
  hidden_leaderboard_table_for_search,
281
  model1_column,
 
 
 
 
 
 
 
282
  search_bar,
283
  ],
284
  leaderboard_table,
285
  )
286
+
287
+
288
+
289
+
290
 
291
 
292
  with gr.Row():