yuragoithf commited on
Commit
909e13b
·
1 Parent(s): 1bc3133

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -64,11 +64,11 @@ def gen_pred(img, model=seg_model):
64
  pred = model.predict(img)
65
  pred = np.squeeze(pred, axis=0)
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 pred
72
 
73
  title = "<h1 style='text-align: center;'>Semantic Segmentation</h1>"
74
  description = "Upload an image and get prediction mask"
 
64
  pred = model.predict(img)
65
  pred = np.squeeze(pred, axis=0)
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 img_bytes
72
 
73
  title = "<h1 style='text-align: center;'>Semantic Segmentation</h1>"
74
  description = "Upload an image and get prediction mask"