Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -66,7 +66,7 @@ def image_create(input_img):
|
|
66 |
latent = torch.randn((1, 512), device=device)
|
67 |
img_out, _, _ = generator([latent])
|
68 |
imgs_arr = make_image(img_out)
|
69 |
-
return imgs_arr[0]
|
70 |
|
71 |
def main():
|
72 |
#torch.cuda.init()
|
@@ -80,7 +80,7 @@ def main():
|
|
80 |
func = functools.partial(image_create, device=device)
|
81 |
func = functools.update_wrapper(func, image_create)
|
82 |
iface = gr.Interface(
|
83 |
-
|
84 |
[
|
85 |
gr.inputs.Number(default=0, label='Seed'),
|
86 |
gr.inputs.Slider(
|
|
|
66 |
latent = torch.randn((1, 512), device=device)
|
67 |
img_out, _, _ = generator([latent])
|
68 |
imgs_arr = make_image(img_out)
|
69 |
+
return imgs_arr[0].cpu().numpy()
|
70 |
|
71 |
def main():
|
72 |
#torch.cuda.init()
|
|
|
80 |
func = functools.partial(image_create, device=device)
|
81 |
func = functools.update_wrapper(func, image_create)
|
82 |
iface = gr.Interface(
|
83 |
+
func,
|
84 |
[
|
85 |
gr.inputs.Number(default=0, label='Seed'),
|
86 |
gr.inputs.Slider(
|