tdeems commited on
Commit
005ad62
1 Parent(s): 4833682

fix resize

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -87,7 +87,7 @@ def inference(img, version, scale, weight):
87
  if scale != 2:
88
  interpolation = cv2.INTER_AREA if scale < 2 else cv2.INTER_LANCZOS4
89
  h, w = img.shape[0:2]
90
- output = cv2.resize(output, (int(w * scale / 2), int(h * scale / 2)), interpolation=interpolation)
91
  except Exception as error:
92
  print('wrong scale input.', error)
93
  if img_mode == 'RGBA': # RGBA images should be saved in png format
 
87
  if scale != 2:
88
  interpolation = cv2.INTER_AREA if scale < 2 else cv2.INTER_LANCZOS4
89
  h, w = img.shape[0:2]
90
+ output = cv2.resize(output, (int(w * scale), int(h * scale)), interpolation=interpolation)
91
  except Exception as error:
92
  print('wrong scale input.', error)
93
  if img_mode == 'RGBA': # RGBA images should be saved in png format