yizhangliu commited on
Commit
cd30a9d
1 Parent(s): ace0747

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -129,8 +129,8 @@ def model_process(image, mask):
129
 
130
  print(f'liuyz_2_here_', type(image), image)
131
 
132
- image_pil = Image.fromarray(image)
133
- mask_pil = Image.fromarray(mask).convert("L")
134
  print(f'image_pil_ = {type(image_pil)}')
135
  print(f'mask_pil_ = {type(mask_pil)}')
136
  mask_pil.save(f'./mask_pil.png')
 
129
 
130
  print(f'liuyz_2_here_', type(image), image)
131
 
132
+ image_pil = Image.fromarray(np.array(image))
133
+ mask_pil = Image.fromarray(np.array(mask)).convert("L")
134
  print(f'image_pil_ = {type(image_pil)}')
135
  print(f'mask_pil_ = {type(mask_pil)}')
136
  mask_pil.save(f'./mask_pil.png')