feng2022 commited on
Commit
2a5cb12
1 Parent(s): 18f9c41

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -77,7 +77,7 @@ def main():
77
  #else:
78
  # ini = "False1"
79
  #result = subprocess.check_output(['nvidia-smi'])
80
-
81
  args = ProjectorArguments().parse(
82
  args=[str(input_path)],
83
  namespace=Namespace(
@@ -88,9 +88,8 @@ def main():
88
  log_visual_freq=1000,
89
  input='text',
90
  ))
91
- #device = torch.device(args.device)
92
- #load_model("stylegan2-ffhq-config-f","feng2022/Time-TravelRephotography_stylegan2-ffhq-config-f",device)
93
-
94
  iface = gr.Interface(
95
  fn=predict,
96
  inputs='text',
 
77
  #else:
78
  # ini = "False1"
79
  #result = subprocess.check_output(['nvidia-smi'])
80
+ #load_model("stylegan2-ffhq-config-f","feng2022/Time-TravelRephotography_stylegan2-ffhq-config-f",device)
81
  args = ProjectorArguments().parse(
82
  args=[str(input_path)],
83
  namespace=Namespace(
 
88
  log_visual_freq=1000,
89
  input='text',
90
  ))
91
+ device = th.device()
92
+ generator = create_generator(args, device)
 
93
  iface = gr.Interface(
94
  fn=predict,
95
  inputs='text',