AlekseyKorshuk commited on
Commit
eeeef15
1 Parent(s): 6deedc6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
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, "punks.png", normalize=True)
92
- return 'punks.png'
 
 
 
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(