Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
|
|
|
|
|
|
|
|
|
| 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
|