Spaces:
Running
on
Zero
Running
on
Zero
lemonaddie
commited on
Update app_recon.py
Browse files- app_recon.py +2 -2
app_recon.py
CHANGED
@@ -90,8 +90,8 @@ pipe = pipe.to(device)
|
|
90 |
def scale_img(img):
|
91 |
width, height = img.size
|
92 |
|
93 |
-
if min(width, height) >
|
94 |
-
scale =
|
95 |
img = img.resize((int(width*scale), int(scale*height)), Image.LANCZOS)
|
96 |
|
97 |
return img
|
|
|
90 |
def scale_img(img):
|
91 |
width, height = img.size
|
92 |
|
93 |
+
if min(width, height) > 512:
|
94 |
+
scale = 512 / min(width, height)
|
95 |
img = img.resize((int(width*scale), int(scale*height)), Image.LANCZOS)
|
96 |
|
97 |
return img
|