Spaces:
Running
on
L40S
Running
on
L40S
Update app.py
Browse files
app.py
CHANGED
@@ -27,7 +27,7 @@ def remove_background(input_url):
|
|
27 |
# Download the image from the URL
|
28 |
image_path = os.path.join(temp_dir, 'input_image.png')
|
29 |
try:
|
30 |
-
image = Image.open(input_url)
|
31 |
image.save(image_path)
|
32 |
except Exception as e:
|
33 |
shutil.rmtree(temp_dir)
|
|
|
27 |
# Download the image from the URL
|
28 |
image_path = os.path.join(temp_dir, 'input_image.png')
|
29 |
try:
|
30 |
+
image = Image.open(input_url).convert("RGBA")
|
31 |
image.save(image_path)
|
32 |
except Exception as e:
|
33 |
shutil.rmtree(temp_dir)
|