akhaliq HF staff commited on
Commit
32482f3
1 Parent(s): f859d50

update model dir

Browse files
Files changed (1) hide show
  1. app.py +1 -4
app.py CHANGED
@@ -2,12 +2,9 @@
2
  import os
3
  import gradio as gr
4
 
5
- MODEL_DIR = 'models/pretrain'
6
- os.makedirs(MODEL_DIR, exist_ok=True)
7
 
8
  os.system("gdown https://drive.google.com/uc?id=1--h-4E5LSxe6VTp9rjJhtoILxxNH0X5n")
9
 
10
- os.system("cp stylegan2-ffhq-config-f-1024x1024.pth models/pretrain/stylegan2-ffhq-config-f-1024x1024.pth")
11
  # python 3.7
12
  """Demo."""
13
  import io
@@ -108,7 +105,7 @@ def imshow(images, col, viz_size=256):
108
 
109
  print('Building generator')
110
 
111
- checkpoint_path=f'{MODEL_DIR}/stylegan2-ffhq-config-f-1024x1024.pth'
112
  config = dict(model_type='StyleGAN2Generator',
113
  resolution=1024,
114
  w_dim=512,
 
2
  import os
3
  import gradio as gr
4
 
 
 
5
 
6
  os.system("gdown https://drive.google.com/uc?id=1--h-4E5LSxe6VTp9rjJhtoILxxNH0X5n")
7
 
 
8
  # python 3.7
9
  """Demo."""
10
  import io
 
105
 
106
  print('Building generator')
107
 
108
+ checkpoint_path='stylegan2-ffhq-config-f-1024x1024.pth'
109
  config = dict(model_type='StyleGAN2Generator',
110
  resolution=1024,
111
  w_dim=512,