bonrix commited on
Commit
5951cdf
·
1 Parent(s): 311eea1

First commit

Browse files
Files changed (1) hide show
  1. app.py +14 -0
app.py ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import easyocr
3
+ import numpy as np
4
+
5
+ def perform_ocr(image):
6
+ reader = easyocr.Reader(['en'])
7
+ result = reader.readtext(image, paragraph=False)
8
+ return result
9
+
10
+ image_input = gr.inputs.Image(label="Input Image")
11
+ text_output = gr.outputs.Textbox(label="OCR Result")
12
+
13
+ iface = gr.Interface(fn=perform_ocr, inputs=image_input, outputs=text_output)
14
+ iface.launch()