Sensei13k commited on
Commit
2c10add
·
verified ·
1 Parent(s): 5d5b53d

created app.py to deploy gradio

Browse files
Files changed (1) hide show
  1. app.py +10 -0
app.py ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from PIL import Image
3
+ import pytesseract
4
+
5
+ def ocr(image):
6
+ extracted_text = pytesseract.image_to_string(image, lang='eng+hin')
7
+ return extracted_text
8
+
9
+ iface = gr.Interface(fn=ocr, inputs=gr.Image(type="pil"), outputs="text")
10
+ iface.launch()