Commit
·
a33be90
1
Parent(s):
a79dc03
Update app.py
Browse files
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 |
-
|
|
|
70 |
# return "UI in developing process ..."
|
71 |
-
return
|
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"
|