Dvjc1899 commited on
Commit
a1f8014
·
1 Parent(s): 000c87e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -27,10 +27,10 @@ def infer(image):
27
  # Restore the image in RGB color space.
28
  out_img_y = out_img_y.clip(0, 255)
29
  out_img_y = out_img_y.reshape((np.shape(out_img_y)[0], np.shape(out_img_y)[1]))
30
- out_img_y = PIL.Image.fromarray(np.uint8(out_img_y), mode="L")
31
  out_img_cb = cb.resize(out_img_y.size, PIL.Image.BICUBIC)
32
  out_img_cr = cr.resize(out_img_y.size, PIL.Image.BICUBIC)
33
- out_img = PIL.Image.merge("YCbCr", (out_img_y, out_img_cb, out_img_cr)).convert(
34
  "RGB"
35
  )
36
  return out_img
 
27
  # Restore the image in RGB color space.
28
  out_img_y = out_img_y.clip(0, 255)
29
  out_img_y = out_img_y.reshape((np.shape(out_img_y)[0], np.shape(out_img_y)[1]))
30
+ out_img_y = Image.fromarray(np.uint8(out_img_y), mode="L")
31
  out_img_cb = cb.resize(out_img_y.size, PIL.Image.BICUBIC)
32
  out_img_cr = cr.resize(out_img_y.size, PIL.Image.BICUBIC)
33
+ out_img = Image.merge("YCbCr", (out_img_y, out_img_cb, out_img_cr)).convert(
34
  "RGB"
35
  )
36
  return out_img