3v324v23 commited on
Commit
a9ee30e
·
1 Parent(s): 4a9ef07
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -1,4 +1,5 @@
1
  import streamlit as st
 
2
  import json
3
  import os
4
  import cv2
@@ -37,4 +38,8 @@ if uploaded_file is not None:
37
  "show_log": True,
38
  })
39
 
40
- st.image(draw_ocr_results(fpath, res, './fonts/simfang.ttf'))
 
 
 
 
 
1
  import streamlit as st
2
+ from PIL import Image, ImageDraw, ImageFont
3
  import json
4
  import os
5
  import cv2
 
38
  "show_log": True,
39
  })
40
 
41
+ st.image(draw_ocr_results(
42
+
43
+ Image.fromarray(
44
+ cv2.imread(fpath, i))
45
+ , res, './fonts/simfang.ttf'))