hantech commited on
Commit
77db1e2
β€’
1 Parent(s): 8bc8be5

Update app.py

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