Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -59,7 +59,7 @@ def process(image: Image.Image) -> Image.Image:
|
|
| 59 |
PIL.Image: The image with the background removed, using the segmentation mask as transparency.
|
| 60 |
"""
|
| 61 |
image_size = image.size
|
| 62 |
-
input_images = transform_image(image).unsqueeze(0).to("
|
| 63 |
# Prediction
|
| 64 |
with torch.no_grad():
|
| 65 |
preds = birefnet(input_images)[-1].sigmoid().cpu()
|
|
|
|
| 59 |
PIL.Image: The image with the background removed, using the segmentation mask as transparency.
|
| 60 |
"""
|
| 61 |
image_size = image.size
|
| 62 |
+
input_images = transform_image(image).unsqueeze(0).to("cpu")
|
| 63 |
# Prediction
|
| 64 |
with torch.no_grad():
|
| 65 |
preds = birefnet(input_images)[-1].sigmoid().cpu()
|