Kaushik Bar commited on
Commit
3703d58
·
1 Parent(s): d048cdc
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -12,9 +12,9 @@ def inference(img, lang):
12
  txts = [line[1][0] for line in result]
13
  scores = [line[1][1] for line in result]
14
 
15
- font_type = ImageFont.truetype("arial.ttf", 18)
16
  im_show = draw_ocr(image, boxes, txts, scores,
17
- font_path=font_type)
18
 
19
  im_show = Image.fromarray(im_show)
20
  im_show.save('result.jpg')
 
12
  txts = [line[1][0] for line in result]
13
  scores = [line[1][1] for line in result]
14
 
15
+ font = ImageFont.load_default()
16
  im_show = draw_ocr(image, boxes, txts, scores,
17
+ font_path=font)
18
 
19
  im_show = Image.fromarray(im_show)
20
  im_show.save('result.jpg')