hantech commited on
Commit
0226999
β€’
1 Parent(s): c5a6d21

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -31,7 +31,7 @@ def draw_boxes(image, bounds, color='yellow', width=2):
31
 
32
  def inference(filepath, lang):
33
  img = cv2.imread(filepath)
34
- width, height = img.size
35
  reader = easyocr.Reader(lang)
36
  bounds = reader.readtext(filepath)
37
  new_bounds=[]
 
31
 
32
  def inference(filepath, lang):
33
  img = cv2.imread(filepath)
34
+ width, height, _ = img.shape
35
  reader = easyocr.Reader(lang)
36
  bounds = reader.readtext(filepath)
37
  new_bounds=[]