alexnasa commited on
Commit
432fb96
·
verified ·
1 Parent(s): 1b753e7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
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 = 120
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)