dimasdeffieux commited on
Commit
486107f
·
verified ·
1 Parent(s): 8a451b2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -6
app.py CHANGED
@@ -16,11 +16,12 @@ def inference(img, lang):
16
  boxes = [line[0] for line in result]
17
  txts = [line[1][0] for line in result]
18
  scores = [line[1][1] for line in result]
19
- return txts
20
- # im_show = draw_ocr(image, boxes, txts, scores,
21
- # font_path='./simfang.ttf')
22
- # im_show = Image.fromarray(im_show)
23
- # im_show.save('result.jpg')
24
- # return 'result.jpg'
 
25
  print(inference(img,"ko"))
26
  #balls
 
16
  boxes = [line[0] for line in result]
17
  txts = [line[1][0] for line in result]
18
  scores = [line[1][1] for line in result]
19
+ im_show = draw_ocr(image, boxes, txts, scores,
20
+ font_path='./simfang.ttf')
21
+ im_show = Image.fromarray(im_show)
22
+ im_show.save('result.jpg')
23
+ return txts
24
+
25
+
26
  print(inference(img,"ko"))
27
  #balls