Commit
·
9155a25
1
Parent(s):
d64c0c1
Update app.py
Browse files
app.py
CHANGED
@@ -25,7 +25,7 @@ def predict_segmentation(img):
|
|
25 |
resized_img = cv2.resize(gray_img, im_size)
|
26 |
# Predict the segmentation mask
|
27 |
pred = learn.predict(resized_img)
|
28 |
-
scaled_pred = (pred[0] * 255).astype(np.uint8)
|
29 |
output_image = PILImage.create(scaled_pred)
|
30 |
return output_image
|
31 |
|
|
|
25 |
resized_img = cv2.resize(gray_img, im_size)
|
26 |
# Predict the segmentation mask
|
27 |
pred = learn.predict(resized_img)
|
28 |
+
scaled_pred = (pred[0].numpy() * 255).astype(np.uint8)
|
29 |
output_image = PILImage.create(scaled_pred)
|
30 |
return output_image
|
31 |
|