geninhu commited on
Commit
0262342
1 Parent(s): 5e5faf7

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -36,7 +36,7 @@ def _denormalize(input: torch.Tensor) -> torch.Tensor:
36
 
37
 
38
  def generate_images(generator, number_imgs):
39
- noise = torch.zeros(number_imgs, 256, 1, 1, device='cuda').normal_(0.0, 1.0)
40
  with torch.no_grad():
41
  gan_images, _ = generator(noise)
42
 
@@ -127,7 +127,7 @@ def main():
127
  <small><i>Please stand by.</i></small>
128
  """,
129
  unsafe_allow_html=True,)
130
-
131
  if generate_button:
132
  generator = load_generator(model_name[img_type])
133
  gan_images = generate_images(generator, number_imgs)
 
36
 
37
 
38
  def generate_images(generator, number_imgs):
39
+ noise = torch.zeros(number_imgs, 256, 1, 1, device=device).normal_(0.0, 1.0)
40
  with torch.no_grad():
41
  gan_images, _ = generator(noise)
42
 
 
127
  <small><i>Please stand by.</i></small>
128
  """,
129
  unsafe_allow_html=True,)
130
+
131
  if generate_button:
132
  generator = load_generator(model_name[img_type])
133
  gan_images = generate_images(generator, number_imgs)