yuragoithf commited on
Commit
a33be90
·
1 Parent(s): a79dc03

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -66,9 +66,10 @@ def gen_pred(img, model=seg_model):
66
  print(pred)
67
  img_bytes = pred.tobytes()
68
  nparr = np.frombuffer(img_bytes, np.byte)
69
- # pred_pil = cv2.imdecode(nparr, cv2.IMREAD_REDUCED_COLOR_8)
 
70
  # return "UI in developing process ..."
71
- return nparr
72
 
73
  title = "<h1 style='text-align: center;'>Semantic Segmentation</h1>"
74
  description = "Upload an image and get prediction mask"
 
66
  print(pred)
67
  img_bytes = pred.tobytes()
68
  nparr = np.frombuffer(img_bytes, np.byte)
69
+ pred_pil = cv2.imdecode(nparr, cv2.IMREAD_REDUCED_COLOR_8)
70
+ print(pred_pil)
71
  # return "UI in developing process ..."
72
+ return pred_pil
73
 
74
  title = "<h1 style='text-align: center;'>Semantic Segmentation</h1>"
75
  description = "Upload an image and get prediction mask"