nlightcho commited on
Commit
0136d74
·
verified ·
1 Parent(s): cc9455d

fix image resize

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -45,7 +45,7 @@ def query_image(img):
45
  return None
46
 
47
  img = Image.fromarray(img)
48
- scale = 1024 / min(img.size)
49
  img = img.resize(
50
  (int(img.size[0] * scale), int(img.size[1] * scale)), Image.LANCZOS
51
  )
 
45
  return None
46
 
47
  img = Image.fromarray(img)
48
+ scale = 1024 / max(img.size)
49
  img = img.resize(
50
  (int(img.size[0] * scale), int(img.size[1] * scale)), Image.LANCZOS
51
  )