Spaces:
Runtime error
Runtime error
Upload app.py
Browse files
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=
|
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)
|