Spaces:
Runtime error
Runtime error
Commit
·
eeeef15
1
Parent(s):
6deedc6
Update app.py
Browse files
app.py
CHANGED
|
@@ -88,8 +88,11 @@ def predict(choice, seed):
|
|
| 88 |
else:
|
| 89 |
z = torch.randn(64, 100, 1, 1)
|
| 90 |
punks = model(z)
|
| 91 |
-
save_image(punks, "
|
| 92 |
-
|
|
|
|
|
|
|
|
|
|
| 93 |
|
| 94 |
|
| 95 |
gr.Interface(
|
|
|
|
| 88 |
else:
|
| 89 |
z = torch.randn(64, 100, 1, 1)
|
| 90 |
punks = model(z)
|
| 91 |
+
save_image(punks, "image.png", normalize=True)
|
| 92 |
+
img = Image.open(f"image.png").convert('RGBA')
|
| 93 |
+
img.putalpha(255)
|
| 94 |
+
img.save("image.png")
|
| 95 |
+
return 'image.png'
|
| 96 |
|
| 97 |
|
| 98 |
gr.Interface(
|