yuragoithf commited on
Commit
332f6f5
·
1 Parent(s): b9b64f9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -63,12 +63,11 @@ def gen_pred(img=inputs, model=seg_model):
63
  img = tf.expand_dims(img, axis=0)
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_pil
72
 
73
  title = "<h1 style='text-align: center;'>Semantic Segmentation</h1>"
74
  description = "Upload an image and get prediction mask"
 
63
  img = tf.expand_dims(img, axis=0)
64
  pred = model.predict(img)
65
  pred = np.squeeze(pred, axis=0)
 
66
  img_bytes = pred.tobytes()
67
  nparr = np.frombuffer(img_bytes, np.byte)
68
  pred_pil = cv2.imdecode(nparr, cv2.IMREAD_REDUCED_COLOR_8)
69
  # return "UI in developing process ..."
70
+ return img_bytes
71
 
72
  title = "<h1 style='text-align: center;'>Semantic Segmentation</h1>"
73
  description = "Upload an image and get prediction mask"