import gradio as gr def wordsrch(img, lang): ocrimg = gr.Interface.load("spaces/PaddlePaddle/PaddleOCR")(img, lang) return ocrimg examples = [["wordsearch2.jpg","en"]] iface = gr.Interface(fn=wordsrch, inputs=[gr.inputs.Image(type='filetype', label='Input'), "en"], outputs=gr.outputs.Image(type='file', label='Output'), examples = examples) iface.launch(debug=True, enable_queue=True)