rootglitch commited on
Commit
b6dd888
·
1 Parent(s): c138b4c

Modified resize image to pass image correctly

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -436,10 +436,10 @@ def resize_image(image, scaling_factor=1):
436
  def resize_to_square(image, size=1024):
437
 
438
  # Load image if a file path is provided
439
- if isinstance(image_path_or_img, str):
440
- img = Image.open(image_path_or_img).convert("RGBA")
441
  else:
442
- img = image_path_or_img.convert("RGBA") # If already an Image object
443
 
444
  # Resize while maintaining aspect ratio
445
  img.thumbnail((size, size), Image.LANCZOS)
 
436
  def resize_to_square(image, size=1024):
437
 
438
  # Load image if a file path is provided
439
+ if isinstance(image, str):
440
+ img = Image.open(image).convert("RGBA")
441
  else:
442
+ img = image.convert("RGBA") # If already an Image object
443
 
444
  # Resize while maintaining aspect ratio
445
  img.thumbnail((size, size), Image.LANCZOS)