Omnibus commited on
Commit
7f67ab8
Β·
1 Parent(s): c54fa02

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -186,11 +186,11 @@ def blur_im(img,bounds,target_lang,trans_lang):
186
  im_w = im.shape[1]
187
  if im_w > im_h:
188
  rato=im_h/im_w
189
- im = cv2.resize(im, (1000,(int((1000)*float(rato)))))
190
  elif im_w < im_h:
191
  rato=im_w/im_h
192
- im = cv2.resize(im, (int((1000)*float(rato)),1000)
193
- elif im_w == im_h:
194
  im = cv2.resize(im,(1000,1000))
195
  for bound in bounds:
196
  if bound[2]>=0.3:
 
186
  im_w = im.shape[1]
187
  if im_w > im_h:
188
  rato=im_h/im_w
189
+ im = cv2.resize(im, (1000,(int(1000*float(rato)))))
190
  elif im_w < im_h:
191
  rato=im_w/im_h
192
+ im = cv2.resize(im, (int(1000*float(rato)),1000)
193
+ else:
194
  im = cv2.resize(im,(1000,1000))
195
  for bound in bounds:
196
  if bound[2]>=0.3: