Beasto commited on
Commit
6089e34
·
verified ·
1 Parent(s): dcdabd8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -92,7 +92,10 @@ def reconstruct_image(img):
92
  out = decoder(z_q)
93
  out_img = np.clip(out[0].numpy() * 255, 0, 255).astype(np.uint8)
94
 
95
- return out_img
 
 
 
96
 
97
  # -------------------------
98
  # Gradio UI
 
92
  out = decoder(z_q)
93
  out_img = np.clip(out[0].numpy() * 255, 0, 255).astype(np.uint8)
94
 
95
+ out_img_pil = Image.fromarray(out_img)
96
+ out_img_upscaled = out_img_pil.resize((512, 512), Image.BICUBIC)
97
+
98
+ return out_img_upscaled
99
 
100
  # -------------------------
101
  # Gradio UI