xinchen9 commited on
Commit
8eff662
1 Parent(s): ca1c231

[Update]change FID to pre-FID and post-FID

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -34,8 +34,8 @@ from dummydatagen import dummy_data_for_plot, create_metric_plot_obj_1, dummydf
34
  import copy
35
 
36
  def load_data(data_path):
37
- columns = ['Unlearned_Methods','Source', 'Diffusion_Models','Pre-ASR', 'Post-ASR','FID']
38
- columns_sorted = ['Unlearned_Methods','Source', 'Diffusion_Models','Pre-ASR', 'Post-ASR','FID']
39
 
40
  df = pd.read_csv(data_path).dropna()
41
  df['Post-ASR'] = df['Post-ASR'].round(0)
@@ -78,8 +78,8 @@ def restart_space():
78
  csv_path='./assets/object_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', '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]
@@ -157,7 +157,7 @@ def select_columns(df: pd.DataFrame, columns_1: list) -> pd.DataFrame:
157
  always_here_cols = ['Unlearned_Methods','Source', 'Diffusion_Models']
158
 
159
  # We use COLS to maintain sorting
160
- all_columns =['Pre-ASR','Post-ASR','FID']
161
 
162
  if (len(columns_1)) == 0:
163
  filtered_df = df[
@@ -193,7 +193,7 @@ with demo:
193
  with gr.Row():
194
  model1_column = gr.CheckboxGroup(
195
  label="Evaluation Metrics",
196
- choices=['Pre-ASR', 'Post-ASR','FID'],
197
  interactive=True,
198
  elem_id="column-select",
199
  )
 
34
  import copy
35
 
36
  def load_data(data_path):
37
+ columns = ['Unlearned_Methods','Source', 'Diffusion_Models','Pre-ASR', 'Post-ASR','Pre-FID', 'Post-FID']
38
+ columns_sorted = ['Unlearned_Methods','Source', 'Diffusion_Models','Pre-ASR', 'Post-ASR','Pre-FID', 'Post-FID']
39
 
40
  df = pd.read_csv(data_path).dropna()
41
  df['Post-ASR'] = df['Post-ASR'].round(0)
 
78
  csv_path='./assets/object_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', 'Post-ASR','Pre-FID']
82
+ show_columns = ['Unlearned_Methods','Source', 'Diffusion_Models','Pre-ASR', 'Post-ASR','Post-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]
 
157
  always_here_cols = ['Unlearned_Methods','Source', 'Diffusion_Models']
158
 
159
  # We use COLS to maintain sorting
160
+ all_columns =['Pre-ASR','Post-ASR','PreFID','Post-FID']
161
 
162
  if (len(columns_1)) == 0:
163
  filtered_df = df[
 
193
  with gr.Row():
194
  model1_column = gr.CheckboxGroup(
195
  label="Evaluation Metrics",
196
+ choices=['Pre-ASR', 'Post-ASR','Pre-FID','Post-FID'],
197
  interactive=True,
198
  elem_id="column-select",
199
  )