Spaces:
Sleeping
Sleeping
[Update]Change read initial files
Browse files
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 |
-
|
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 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
|
257 |
-
|
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]
|