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