eskayML commited on
Commit
da831e6
·
1 Parent(s): c7d04ad

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -0
app.py ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import easyocr
3
+
4
+ def get_text(img):
5
+ reader = easyocr.Reader(['en'], gpu = False)
6
+ result = reader.readtext(img_path)
7
+ result_text = " ".join([i[1] for i in result])
8
+
9
+ return result_text
10
+
11
+
12
+ demo = gr.Interface(
13
+ fn = get_text,
14
+ inputs= 'image',
15
+ outputs = 'text'
16
+ )
17
+
18
+ demo.launch()