wsfung2008 commited on
Commit
9cb950b
·
1 Parent(s): f106c8b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -44,11 +44,13 @@ def find_layout(image, mode):
44
 
45
  # convert_info_docx(img, res, save_folder, os.path.basename("result").split('.')[0])
46
 
 
 
47
  # image = Image.open(img_path).convert('RGB')
48
  image = image.convert('RGB')
49
  # img = img.convert('RGB')
50
- im_show = draw_structure_result(image, result)
51
- # im_show = Image.fromarray(im_show)
52
  # im_show.save('result.jpg')
53
 
54
  return final_text, im_show
 
44
 
45
  # convert_info_docx(img, res, save_folder, os.path.basename("result").split('.')[0])
46
 
47
+ font_path = 'simfang.ttf' # PaddleOCR下提供字体包
48
+
49
  # image = Image.open(img_path).convert('RGB')
50
  image = image.convert('RGB')
51
  # img = img.convert('RGB')
52
+ im_show = draw_structure_result(image, result, font_path=font_path)
53
+ im_show = Image.fromarray(im_show)
54
  # im_show.save('result.jpg')
55
 
56
  return final_text, im_show