buio commited on
Commit
437ef4e
·
1 Parent(s): 8813424

cleaned app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -35
app.py CHANGED
@@ -31,8 +31,7 @@ tf.random.set_seed(SEED)
31
  import gradio as gr
32
  import wget
33
  import pandas as pd
34
- import gdown
35
- from zipfile import ZipFile
36
 
37
  """## Download CelebA attributes
38
 
@@ -42,7 +41,7 @@ We'll use face images from the CelebA dataset, resized to 64x64.
42
  #Download labels from public github, they have been processed in a 0,1 csv file
43
  os.mkdir("/content/celeba_gan")
44
  wget.download(url="https://github.com/buoi/conditional-face-GAN/blob/main/list_attr_celeba01.csv.zip?raw=true", out="/content/celeba_gan/list_attr_celeba01.csv.zip")
45
- import shutil
46
  shutil.unpack_archive(filename="/content/celeba_gan/list_attr_celeba01.csv.zip", extract_dir="/content/celeba_gan")
47
 
48
  """## Dataset preprocessing functions"""
@@ -75,38 +74,6 @@ def resize64(img):
75
 
76
  ## Load trained GAN
77
  """
78
-
79
- from collections import namedtuple
80
- ModelEntry = namedtuple('ModelEntry', '''entity, resume_id, model_name, exp_name, best_epoch, expected_fid, expected_f1, expected_acc, epoch_range, exp_avg_fid, exp_avg_f1, exp_avg_acc''')
81
-
82
- dcgan = ModelEntry('buio','t1qyadzp', 'dcgan','dcgan',
83
- 'v24',25.64, 0, 0, (16,28), 24.29, 0,0)
84
-
85
- acgan2 = ModelEntry('buio','rn8xslip','acgan2_BNstdev','acgan2_BNstdev',
86
- 'v22', 29.05, 0.9182, 0.9295, (20,31), 24.79, 0.918, 0.926)
87
-
88
- acgan10 = ModelEntry('buio','3ja6uvac','acgan10_nonseparBNstdev_split','acgan10_nonseparBNstdev_split',
89
- 'v24', 26.89, 0.859, 0.785, (18,30), 24.59, 0.789,0.858)
90
-
91
- acgan40 = ModelEntry('buio','2ev65fpt','acgan40_BNstdev','acgan40_BNstdev',
92
- 'v15', 28.23, 0.430, 0.842, (15,25), 27.72, 04.6, 0.851)
93
-
94
-
95
- acgan2_hd = ModelEntry('buio','6km6fdgr','acgan2_BNstdev_218x178','acgan2_BNstdev_218x178',
96
- 'v11', 0,0,0 ,(0,0), 0, 0, 0)
97
-
98
- acgan10_hd = ModelEntry('buio','3v366skw','acgan40_BNstdev_218x178','acgan40_BNstdev_218x178',
99
- 'v14', 0,0,0, (0,0),0, 0, 0)
100
-
101
- acgan40_hd = ModelEntry('buio','booicugb','acgan10_nonseparBNstdev_split_299_218x178','acgan10_nonseparBNstdev_split_299_218x178',
102
- 'v14', 52.9, 0.410, 0.834, (12,15), 0, 0, 0)
103
-
104
-
105
-
106
- #1cr1a5w4 SAGAN_3 v31 buianifolli
107
- #2o3z6bqb SAGAN_5 v17 buianifolli
108
- #zscel8bz SAGAN_6 v29 buianifolli
109
-
110
  #wandb artifacts
111
  #sagan40 v18
112
 
 
31
  import gradio as gr
32
  import wget
33
  import pandas as pd
34
+ import shutil
 
35
 
36
  """## Download CelebA attributes
37
 
 
41
  #Download labels from public github, they have been processed in a 0,1 csv file
42
  os.mkdir("/content/celeba_gan")
43
  wget.download(url="https://github.com/buoi/conditional-face-GAN/blob/main/list_attr_celeba01.csv.zip?raw=true", out="/content/celeba_gan/list_attr_celeba01.csv.zip")
44
+
45
  shutil.unpack_archive(filename="/content/celeba_gan/list_attr_celeba01.csv.zip", extract_dir="/content/celeba_gan")
46
 
47
  """## Dataset preprocessing functions"""
 
74
 
75
  ## Load trained GAN
76
  """
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
77
  #wandb artifacts
78
  #sagan40 v18
79