hantech commited on
Commit
d0777ea
Β·
1 Parent(s): cfda9d7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -46,7 +46,7 @@ def inference(filepath, lang):
46
  min_y = min(tl[1], tr[1], br[1], bl[1])
47
  max_y = max(tl[1], tr[1], br[1], bl[1])
48
  # crop the region of interest (ROI)
49
- cropped_image = Image.fromarray(img[min_y:max_y,min_x:max_x]) # crop the image
50
  out = recognitor.predict(cropped_image)
51
  print(out)
52
  new_bounds.append((bbox,text, out, prob))
 
46
  min_y = min(tl[1], tr[1], br[1], bl[1])
47
  max_y = max(tl[1], tr[1], br[1], bl[1])
48
  # crop the region of interest (ROI)
49
+ cropped_image = Image.fromarray(img.crop([min_y:max_y,min_x:max_x])) # crop the image
50
  out = recognitor.predict(cropped_image)
51
  print(out)
52
  new_bounds.append((bbox,text, out, prob))