Spaces:
Build error
Build error
akiyamasho
commited on
Commit
•
0df0208
1
Parent(s):
a69bd1e
MAINT: thumbnail
Browse files
app.py
CHANGED
@@ -72,7 +72,7 @@ def get_model(style):
|
|
72 |
def adjust_image_for_model(img):
|
73 |
logger.info(f"Image Height: {img.height}, Image Width: {img.width}")
|
74 |
if img.height > MAX_DIMENSION or img.width > MAX_DIMENSION:
|
75 |
-
img
|
76 |
|
77 |
return img
|
78 |
|
|
|
72 |
def adjust_image_for_model(img):
|
73 |
logger.info(f"Image Height: {img.height}, Image Width: {img.width}")
|
74 |
if img.height > MAX_DIMENSION or img.width > MAX_DIMENSION:
|
75 |
+
img.thumbnail((MAX_DIMENSION, MAX_DIMENSION), Image.ANTIALIAS)
|
76 |
|
77 |
return img
|
78 |
|