Update app.py
Browse files
app.py
CHANGED
|
@@ -278,7 +278,7 @@ def norm_path(filepath):
|
|
| 278 |
img = np.clip(img, 0, 1)
|
| 279 |
fpath, fext = os.path.splitext(filepath)
|
| 280 |
filepath = fpath +'.png'
|
| 281 |
-
pil_image = Image.fromarray(img)
|
| 282 |
pil_image.save(filepath)
|
| 283 |
#imsave(filepath, pil_image)
|
| 284 |
return filepath
|
|
|
|
| 278 |
img = np.clip(img, 0, 1)
|
| 279 |
fpath, fext = os.path.splitext(filepath)
|
| 280 |
filepath = fpath +'.png'
|
| 281 |
+
pil_image = Image.fromarray((255. * img).astype(np.uint8))
|
| 282 |
pil_image.save(filepath)
|
| 283 |
#imsave(filepath, pil_image)
|
| 284 |
return filepath
|