Update app.py
Browse files
app.py
CHANGED
@@ -34,7 +34,7 @@ def process_image(image, prompt):
|
|
34 |
plt.imsave("mask.png", torch.sigmoid(preds))
|
35 |
mask_image = Image.open("mask.png").convert("RGB")
|
36 |
|
37 |
-
image =
|
38 |
imageio.imwrite("./data/data.png", image)
|
39 |
# Convert mask to grayscale format
|
40 |
mask_image = mask_image.resize((image.shape[1], image.shape[0]))
|
|
|
34 |
plt.imsave("mask.png", torch.sigmoid(preds))
|
35 |
mask_image = Image.open("mask.png").convert("RGB")
|
36 |
|
37 |
+
image = np.array(image)
|
38 |
imageio.imwrite("./data/data.png", image)
|
39 |
# Convert mask to grayscale format
|
40 |
mask_image = mask_image.resize((image.shape[1], image.shape[0]))
|