Onur Savas commited on
Commit
4b32f27
1 Parent(s): ceeb3e5

updated ocr

Browse files
Files changed (1) hide show
  1. main.py +6 -6
main.py CHANGED
@@ -29,12 +29,12 @@ def perform_ocr(img):
29
  final_result = ""
30
 
31
  image = Image.open(img).convert('RGB')
32
- boxes = [line[0] for line in result]
33
- txts = [line[1][0] for line in result]
34
- scores = [line[1][1] for line in result]
35
- im_show = draw_ocr(image, boxes, txts, scores, font_path='fonts/simfang.ttf')
36
- im_show = Image.fromarray(im_show)
37
- return [im_show, final_result]
38
 
39
  demo = gr.Blocks()
40
 
 
29
  final_result = ""
30
 
31
  image = Image.open(img).convert('RGB')
32
+ # boxes = [line[0] for line in result]
33
+ # txts = [line[1][0] for line in result]
34
+ # scores = [line[1][1] for line in result]
35
+ # im_show = draw_ocr(image, boxes, txts, scores, font_path='fonts/simfang.ttf')
36
+ # im_show = Image.fromarray(im_show)
37
+ return [image, result]
38
 
39
  demo = gr.Blocks()
40