xinchen9 commited on
Commit
b24fe54
1 Parent(s): 2bdbd9b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +92 -36
app.py CHANGED
@@ -231,27 +231,46 @@ with demo:
231
  # 1, 100, value=40,
232
  # step=1, label="Attacking Steps", info="Choose between 1 and 100",
233
  # interactive=True,)
234
- for i in range(2):
235
- gr.Markdown("### Unlearned Concepts Parachute")
236
- leaderboard_table = gr.components.Dataframe(
237
- value = df_results,
238
- datatype = TYPES,
239
- elem_id = "leaderboard-table",
240
- interactive = False,
241
- visible=True,
242
- # column_widths=["20%", "6%", "8%", "6%", "8%", "8%", "6%", "6%", "6%", "6%", "6%"],
243
- )
244
-
245
  # gr.Markdown("The \"Cost\" column is calculated as USD / Million tokens of output.")
246
 
247
- hidden_leaderboard_table_for_search = gr.components.Dataframe(
248
- value=df_results_init,
249
- # elem_id="leaderboard-table",
250
- interactive=False,
251
- visible=False,
252
- )
253
 
254
- search_bar.submit(
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
255
  update_table,
256
  [
257
  # df_avg,
@@ -268,26 +287,63 @@ with demo:
268
  ],
269
  leaderboard_table,
270
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
271
 
272
  #for selector in [type_query, open_query]:
273
- for selector in [open_query,model1_column]:
274
- selector.change(
275
- update_table,
276
- [
277
- # df_avg,
278
- hidden_leaderboard_table_for_search,
279
- model1_column,
280
- # shown_columns,
281
- #type_query,
282
- open_query,
283
- # filter_columns_type,
284
- # filter_columns_precision,
285
- # filter_columns_size,
286
- # deleted_models_visibility,
287
- search_bar,
288
- ],
289
- leaderboard_table,
290
- )
291
  # with gr.Row():
292
  # shown_columns = gr.CheckboxGroup(
293
  # choices=[
 
231
  # 1, 100, value=40,
232
  # step=1, label="Attacking Steps", info="Choose between 1 and 100",
233
  # interactive=True,)
234
+ gr.Markdown("### Unlearned Concepts Parachute")
235
+ leaderboard_table = gr.components.Dataframe(
236
+ value = df_results,
237
+ datatype = TYPES,
238
+ elem_id = "leaderboard-table",
239
+ interactive = False,
240
+ visible=True,
241
+ # column_widths=["20%", "6%", "8%", "6%", "8%", "8%", "6%", "6%", "6%", "6%", "6%"],
242
+ )
243
+
 
244
  # gr.Markdown("The \"Cost\" column is calculated as USD / Million tokens of output.")
245
 
246
+ hidden_leaderboard_table_for_search = gr.components.Dataframe(
247
+ value=df_results_init,
248
+ # elem_id="leaderboard-table",
249
+ interactive=False,
250
+ visible=False,
251
+ )
252
 
253
+ search_bar.submit(
254
+ update_table,
255
+ [
256
+ # df_avg,
257
+ hidden_leaderboard_table_for_search,
258
+ model1_column,
259
+ # shown_columns,
260
+ #type_query,
261
+ open_query,
262
+ # filter_columns_type,
263
+ # filter_columns_precision,
264
+ # filter_columns_size,
265
+ # deleted_models_visibility,
266
+ search_bar,
267
+ ],
268
+ leaderboard_table,
269
+ )
270
+
271
+ #for selector in [type_query, open_query]:
272
+ for selector in [open_query,model1_column]:
273
+ selector.change(
274
  update_table,
275
  [
276
  # df_avg,
 
287
  ],
288
  leaderboard_table,
289
  )
290
+
291
+ gr.Markdown("### Unlearned Concepts Parachute")
292
+ leaderboard_table = gr.components.Dataframe(
293
+ value = df_results,
294
+ datatype = TYPES,
295
+ elem_id = "leaderboard-table",
296
+ interactive = False,
297
+ visible=True,
298
+ # column_widths=["20%", "6%", "8%", "6%", "8%", "8%", "6%", "6%", "6%", "6%", "6%"],
299
+ )
300
+
301
+ # gr.Markdown("The \"Cost\" column is calculated as USD / Million tokens of output.")
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 [open_query,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
  # with gr.Row():
348
  # shown_columns = gr.CheckboxGroup(
349
  # choices=[