Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -58,7 +58,7 @@ def apply_mask(image: Image.Image, prompt: str, color: str) -> Image.Image:
|
|
| 58 |
masked_image = image_np.copy()
|
| 59 |
masked_image[mask_bin == 1] = (
|
| 60 |
0.5 * masked_image[mask_bin == 1] + 0.5 * overlay[mask_bin == 1]).astype(np.units)
|
| 61 |
-
|
| 62 |
# Apply the mask to the image
|
| 63 |
masked_image = np.where(mask_3d == 1, overlay, image_np)
|
| 64 |
return Image.fromarray(masked_image)
|
|
|
|
| 58 |
masked_image = image_np.copy()
|
| 59 |
masked_image[mask_bin == 1] = (
|
| 60 |
0.5 * masked_image[mask_bin == 1] + 0.5 * overlay[mask_bin == 1]).astype(np.units)
|
| 61 |
+
|
| 62 |
# Apply the mask to the image
|
| 63 |
masked_image = np.where(mask_3d == 1, overlay, image_np)
|
| 64 |
return Image.fromarray(masked_image)
|