Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -180,7 +180,7 @@ def preprocess_image(input_image: Image.Image) -> Image.Image:
|
|
180 |
duration = 60
|
181 |
|
182 |
if ori_width > 384 or ori_height > 384:
|
183 |
-
duration =
|
184 |
elif ori_width > 1024 or ori_height > 1024:
|
185 |
duration = 240
|
186 |
|
@@ -189,6 +189,9 @@ def preprocess_image(input_image: Image.Image) -> Image.Image:
|
|
189 |
@spaces.GPU()
|
190 |
def preprocess_n_magnify(input_image: Image.Image):
|
191 |
duration = preprocess_image(input_image)
|
|
|
|
|
|
|
192 |
img, magnified_img = magnify(input_image, duration)
|
193 |
|
194 |
return duration, (img, magnified_img)
|
|
|
180 |
duration = 60
|
181 |
|
182 |
if ori_width > 384 or ori_height > 384:
|
183 |
+
duration = 180
|
184 |
elif ori_width > 1024 or ori_height > 1024:
|
185 |
duration = 240
|
186 |
|
|
|
189 |
@spaces.GPU()
|
190 |
def preprocess_n_magnify(input_image: Image.Image):
|
191 |
duration = preprocess_image(input_image)
|
192 |
+
|
193 |
+
yield duration, (None, None)
|
194 |
+
|
195 |
img, magnified_img = magnify(input_image, duration)
|
196 |
|
197 |
return duration, (img, magnified_img)
|