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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -2
app.py CHANGED
@@ -81,7 +81,7 @@ methods = list(set(df_results['Unlearned_Methods']))
81
  all_columns = ['Unlearned_Methods','Source', 'Diffusion_Models','Pre-ASR', 'Post-ASR','FID']
82
  show_columns = ['Unlearned_Methods','Source', 'Diffusion_Models','Pre-ASR', 'Post-ASR','FID']
83
  TYPES = ['str', 'markdown', 'str', 'number', 'number', 'number']
84
- files = ['church','garbage','parachute','tench', 'vangogh', 'nidity', 'violence','illegal_activity']
85
  df_results_init = df_results.copy()[show_columns]
86
 
87
  def update_table(
@@ -247,7 +247,7 @@ with demo:
247
  elif files[i] == 'violence':
248
  name = "### Unlearned Concepts "+" Violence"
249
  csv_path = './assets/'+files[i]+'.csv'
250
- elif files[i] == 'ill':
251
  name = "### Unlearned Concepts "+" Illgal Activity"
252
  csv_path = './assets/'+files[i]+'.csv'
253
 
@@ -283,6 +283,17 @@ with demo:
283
  ],
284
  leaderboard_table,
285
  )
 
 
 
 
 
 
 
 
 
 
 
286
 
287
 
288
 
 
81
  all_columns = ['Unlearned_Methods','Source', 'Diffusion_Models','Pre-ASR', 'Post-ASR','FID']
82
  show_columns = ['Unlearned_Methods','Source', 'Diffusion_Models','Pre-ASR', 'Post-ASR','FID']
83
  TYPES = ['str', 'markdown', 'str', 'number', 'number', 'number']
84
+ files = ['church','garbage','parachute','tench', 'vangogh', 'nudity', 'violence','illegal_activity']
85
  df_results_init = df_results.copy()[show_columns]
86
 
87
  def update_table(
 
247
  elif files[i] == 'violence':
248
  name = "### Unlearned Concepts "+" Violence"
249
  csv_path = './assets/'+files[i]+'.csv'
250
+ elif files[i] == 'illegal_activity':
251
  name = "### Unlearned Concepts "+" Illgal Activity"
252
  csv_path = './assets/'+files[i]+'.csv'
253
 
 
283
  ],
284
  leaderboard_table,
285
  )
286
+
287
+ for selector in [model1_column]:
288
+ selector.change(
289
+ update_table,
290
+ [
291
+ hidden_leaderboard_table_for_search,
292
+ model1_column,
293
+ search_bar,
294
+ ],
295
+ leaderboard_table,
296
+ )
297
 
298
 
299