fffiloni commited on
Commit
e7e8daa
1 Parent(s): 7bb79b2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -15,7 +15,7 @@ def remove_background(input_url):
15
  # Download the image from the URL
16
  image_path = os.path.join(temp_dir, 'input_image.png')
17
  try:
18
- image = Image.open(requests.get(input_url, stream=True).raw)
19
  image.save(image_path)
20
  except Exception as e:
21
  shutil.rmtree(temp_dir)
 
15
  # Download the image from the URL
16
  image_path = os.path.join(temp_dir, 'input_image.png')
17
  try:
18
+ image = Image.open(input_url)
19
  image.save(image_path)
20
  except Exception as e:
21
  shutil.rmtree(temp_dir)