Spaces:
Sleeping
Sleeping
Commit
•
6fd9fb9
1
Parent(s):
cbc0a64
Update app.py
Browse files
app.py
CHANGED
@@ -55,7 +55,7 @@ def resize(img):
|
|
55 |
scale_ratio = max_side / max(h, w)
|
56 |
wsize=int(w*scale_ratio)
|
57 |
hsize=int(h*scale_ratio)
|
58 |
-
img = img.resize((wsize,hsize), Image.
|
59 |
w = img.size[0]
|
60 |
h = img.size[1]
|
61 |
img = img.crop((0, 0, w-w%8, h-h%8))
|
|
|
55 |
scale_ratio = max_side / max(h, w)
|
56 |
wsize=int(w*scale_ratio)
|
57 |
hsize=int(h*scale_ratio)
|
58 |
+
img = img.resize((wsize,hsize), Image.ANTIALIAS)
|
59 |
w = img.size[0]
|
60 |
h = img.size[1]
|
61 |
img = img.crop((0, 0, w-w%8, h-h%8))
|