ysharma's picture
ysharma HF staff
1
39aa976
raw history blame
No virus
576 Bytes
import gradio as gr
def wordsrch(img):
lang = "en"
ocrimg = gr.Interface.load("spaces/PaddlePaddle/PaddleOCR")(img, lang)
return ocrimg
#examples = [["wordsearch2.jpg","en"]]
examples = ["wordsearch2.jpg"]
iface = gr.Interface(fn=wordsrch,
# Please choose from: 'numpy', 'pil', 'filepath'.
inputs=gr.inputs.Image(type='numpy', label='Input'), #"en"],
outputs=gr.outputs.Image(type='file', label='Output'),
examples = examples)
iface.launch(debug=True, enable_queue=True)