xinchen9 commited on
Commit
7812a63
1 Parent(s): eadc0b5

[Update]Change read initial files

Browse files
Files changed (1) hide show
  1. app.py +26 -28
app.py CHANGED
@@ -75,13 +75,14 @@ def restart_space():
75
  # running_eval_queue_df,
76
  # pending_eval_queue_df,
77
  # ) = get_evaluation_queue_df(EVAL_REQUESTS_PATH, EVAL_COLS)
78
- csv_path='./assets/parachute.csv'
79
- df_results = load_data(csv_path)
80
- methods = list(set(df_results['Unlearned_Methods']))
81
  all_columns = ['Unlearned_Methods','Source', 'Diffusion_Models','Pre-ASR','Pre-ASR','Post-FID']
82
  show_columns = ['Unlearned_Methods','Source', 'Diffusion_Models','Pre-ASR','Pre-ASR','Post-FID']
83
  TYPES = ['str', 'markdown', 'str', 'number', '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(
@@ -229,32 +230,29 @@ with demo:
229
  if files[0] == "church":
230
  name = "### Unlearned Objects "+" Church"
231
  csv_path = './assets/'+files[i]+'.csv'
232
- # elif files[i] == 'garbage':
233
- # name = "### Unlearned Objects "+" Garbage"
234
- # csv_path = './assets/'+files[i]+'.csv'
235
- # elif files[i] == 'tench':
236
- # name = "### Unlearned Objects "+" Tench"
237
- # csv_path = './assets/'+files[i]+'.csv'
238
- # elif files[i] == 'parachute':
239
- # name = "### Unlearned Objects "+" Parachute"
240
- # csv_path = './assets/'+files[i]+'.csv'
241
- # elif files[i] == 'vangogh':
242
- # name = "### Unlearned Stype "+" Van Gogh"
243
- # csv_path = './assets/'+files[i]+'.csv'
244
- # elif files[i] == 'nudity':
245
- # name = "### Unlearned Concepts "+" Nudity"
246
- # csv_path = './assets/'+files[i]+'.csv'
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
-
254
-
255
-
256
 
257
- print(i)
258
  gr.Markdown(name)
259
  df_results = load_data(csv_path)
260
  df_results_init = df_results.copy()[show_columns]
 
75
  # running_eval_queue_df,
76
  # pending_eval_queue_df,
77
  # ) = get_evaluation_queue_df(EVAL_REQUESTS_PATH, EVAL_COLS)
78
+
 
 
79
  all_columns = ['Unlearned_Methods','Source', 'Diffusion_Models','Pre-ASR','Pre-ASR','Post-FID']
80
  show_columns = ['Unlearned_Methods','Source', 'Diffusion_Models','Pre-ASR','Pre-ASR','Post-FID']
81
  TYPES = ['str', 'markdown', 'str', 'number', 'number', 'number', 'number']
82
  files = ['church','garbage','parachute','tench', 'vangogh', 'nudity', 'violence','illegal_activity']
83
+ csv_path='./assets/'+files[0]+'cvs'
84
+ df_results = load_data(csv_path)
85
+ methods = list(set(df_results['Unlearned_Methods']))
86
  df_results_init = df_results.copy()[show_columns]
87
 
88
  def update_table(
 
230
  if files[0] == "church":
231
  name = "### Unlearned Objects "+" Church"
232
  csv_path = './assets/'+files[i]+'.csv'
233
+ elif files[i] == 'garbage':
234
+ name = "### Unlearned Objects "+" Garbage"
235
+ csv_path = './assets/'+files[i]+'.csv'
236
+ elif files[i] == 'tench':
237
+ name = "### Unlearned Objects "+" Tench"
238
+ csv_path = './assets/'+files[i]+'.csv'
239
+ elif files[i] == 'parachute':
240
+ name = "### Unlearned Objects "+" Parachute"
241
+ csv_path = './assets/'+files[i]+'.csv'
242
+ elif files[i] == 'vangogh':
243
+ name = "### Unlearned Stype "+" Van Gogh"
244
+ csv_path = './assets/'+files[i]+'.csv'
245
+ elif files[i] == 'nudity':
246
+ name = "### Unlearned Concepts "+" Nudity"
247
+ csv_path = './assets/'+files[i]+'.csv'
248
+ elif files[i] == 'violence':
249
+ name = "### Unlearned Concepts "+" Violence"
250
+ csv_path = './assets/'+files[i]+'.csv'
251
+ elif files[i] == 'illegal_activity':
252
+ name = "### Unlearned Concepts "+" Illgal Activity"
253
+ csv_path = './assets/'+files[i]+'.csv'
 
 
 
254
 
255
+
256
  gr.Markdown(name)
257
  df_results = load_data(csv_path)
258
  df_results_init = df_results.copy()[show_columns]