Spaces:
Runtime error
Runtime error
app.py
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
|
3 |
+
def wordsrch(img, lang):
|
4 |
+
ocrimg = gr.Interface.load("spaces/PaddlePaddle/PaddleOCR")(img, lang)
|
5 |
+
return ocrimg
|
6 |
+
|
7 |
+
examples = [["wordsearch2.jpg","en"]]
|
8 |
+
|
9 |
+
iface = gr.Interface(fn=wordsrch,
|
10 |
+
inputs=[gr.inputs.Image(type='filetype', label='Input'), "en"],
|
11 |
+
outputs=gr.outputs.Image(type='file', label='Output'),
|
12 |
+
examples = examples)
|
13 |
+
iface.launch(debug=True, enable_queue=True)
|