Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -21,7 +21,7 @@ transform_image = transforms.Compose(
|
|
21 |
]
|
22 |
)
|
23 |
|
24 |
-
def fn(image: Union[
|
25 |
"""
|
26 |
Remove the background from an image and return both the transparent version and the original.
|
27 |
|
@@ -44,7 +44,7 @@ def fn(image: Union[PILImage.Image, str]) -> Tuple[PILImage.Image, PILImage.Imag
|
|
44 |
return (processed_image, origin)
|
45 |
|
46 |
@spaces.GPU
|
47 |
-
def process(image:
|
48 |
"""
|
49 |
Apply BiRefNet-based image segmentation to remove the background.
|
50 |
|
|
|
21 |
]
|
22 |
)
|
23 |
|
24 |
+
def fn(image: Union[Image.Image, str]) -> Tuple[Image.Image, Image.Image]:
|
25 |
"""
|
26 |
Remove the background from an image and return both the transparent version and the original.
|
27 |
|
|
|
44 |
return (processed_image, origin)
|
45 |
|
46 |
@spaces.GPU
|
47 |
+
def process(image: Image.Image) -> Image.Image:
|
48 |
"""
|
49 |
Apply BiRefNet-based image segmentation to remove the background.
|
50 |
|