Spaces:
Build error
Build error
created app.py to deploy gradio
Browse files
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()
|