hantech commited on
Commit
4d92518
Β·
1 Parent(s): 1571453

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -42,11 +42,10 @@ def inference(filepath, lang):
42
  bounds = reader.readtext(filepath)
43
  new_bounds=[]
44
  for (bbox, text, prob) in bounds:
45
- print(bbox)
46
- y0 = bbox[0].min()
47
- y1 = bbox[0].max()
48
- x0 = bbox[1].min()
49
- x1 = bbox[1].max()
50
 
51
  # crop the region of interest (ROI)
52
  img = Image.open(filepath)
 
42
  bounds = reader.readtext(filepath)
43
  new_bounds=[]
44
  for (bbox, text, prob) in bounds:
45
+ y0 = min(bbox[0])
46
+ y1 = max(bbox[0])
47
+ x0 = min(bbox[1])
48
+ x1 = max(bbox[1])
 
49
 
50
  # crop the region of interest (ROI)
51
  img = Image.open(filepath)