fffiloni commited on
Commit
79c74d8
1 Parent(s): 3d09012

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -44,7 +44,8 @@ def remove_background(input_url):
44
  image_path = os.path.join(temp_dir, 'input_image.png')
45
  try:
46
  image = Image.open(input_url)
47
- image.save(image_path)
 
48
  except Exception as e:
49
  shutil.rmtree(temp_dir)
50
  return f"Error downloading or saving the image: {str(e)}"
 
44
  image_path = os.path.join(temp_dir, 'input_image.png')
45
  try:
46
  image = Image.open(input_url)
47
+ flipped_image = image.transpose(Image.FLIP_LEFT_RIGHT) # Mirror-flip the image
48
+ flipped_image.save(image_path)
49
  except Exception as e:
50
  shutil.rmtree(temp_dir)
51
  return f"Error downloading or saving the image: {str(e)}"