Spaces:
Build error
Build error
minor fixes
Browse files
app.py
CHANGED
@@ -53,7 +53,9 @@ def predict(image):
|
|
53 |
mask *= 255
|
54 |
|
55 |
mask = np.array(Image.fromarray(mask).convert("L"))
|
56 |
-
mask =
|
|
|
|
|
57 |
|
58 |
return mask
|
59 |
|
|
|
53 |
mask *= 255
|
54 |
|
55 |
mask = np.array(Image.fromarray(mask).convert("L"))
|
56 |
+
mask = tf.image.resize(mask[..., tf.newaxis], original_shape)
|
57 |
+
mask = tf.cast(mask, tf.uint8)
|
58 |
+
mask = mask.numpy().squeeze()
|
59 |
|
60 |
return mask
|
61 |
|