qubvel-hf HF Staff commited on
Commit
745226b
·
verified ·
1 Parent(s): eff589b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -168,7 +168,7 @@ def process_image(
168
 
169
  def get_target_size(image_height, image_width, max_size: int):
170
  if image_height < max_size and image_width < max_size:
171
- new_height, new_width = image_width, image_height
172
  elif image_height > image_width:
173
  new_height = max_size
174
  new_width = int(image_width * max_size / image_height)
 
168
 
169
  def get_target_size(image_height, image_width, max_size: int):
170
  if image_height < max_size and image_width < max_size:
171
+ new_height, new_width = image_height, image_width
172
  elif image_height > image_width:
173
  new_height = max_size
174
  new_width = int(image_width * max_size / image_height)