fix the result error

#4
by robin0307 - opened
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -12,6 +12,7 @@ def inference(img, lang):
12
  ocr = PaddleOCR(use_angle_cls=True, lang=lang,use_gpu=False)
13
  img_path = img.name
14
  result = ocr.ocr(img_path, cls=True)
 
15
  image = Image.open(img_path).convert('RGB')
16
  boxes = [line[0] for line in result]
17
  txts = [line[1][0] for line in result]
 
12
  ocr = PaddleOCR(use_angle_cls=True, lang=lang,use_gpu=False)
13
  img_path = img.name
14
  result = ocr.ocr(img_path, cls=True)
15
+ result = result[0]
16
  image = Image.open(img_path).convert('RGB')
17
  boxes = [line[0] for line in result]
18
  txts = [line[1][0] for line in result]