mouseland commited on
Commit
692738d
·
verified ·
1 Parent(s): 7b4fea1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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