fffiloni commited on
Commit
9e213b1
1 Parent(s): ce18996

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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)