Spaces:
Runtime error
Runtime error
app.py
CHANGED
@@ -4,7 +4,8 @@ def wordsrch(img):
|
|
4 |
lang = ["en"]
|
5 |
#ocrimg = gr.Interface.load("spaces/PaddlePaddle/PaddleOCR")(img, lang)
|
6 |
ocrimg, dframe = gr.Interface.load("spaces/tomofi/EasyOCR")(img, lang)
|
7 |
-
|
|
|
8 |
|
9 |
#examples = [["wordsearch2.jpg","en"]]
|
10 |
examples = ["wordsearch2.jpg"]
|
@@ -13,6 +14,7 @@ iface = gr.Interface(fn=wordsrch,
|
|
13 |
# Please choose from: 'numpy', 'pil', 'filepath'.
|
14 |
inputs=gr.inputs.Image(type='filepath', label='Input'), #"en"],
|
15 |
#outputs=gr.outputs.Image(type='file', label='Output'),
|
16 |
-
outputs=
|
17 |
examples = examples)
|
|
|
18 |
iface.launch(debug=True, enable_queue=True)
|
|
|
4 |
lang = ["en"]
|
5 |
#ocrimg = gr.Interface.load("spaces/PaddlePaddle/PaddleOCR")(img, lang)
|
6 |
ocrimg, dframe = gr.Interface.load("spaces/tomofi/EasyOCR")(img, lang)
|
7 |
+
print(dframe)
|
8 |
+
return ocrimg
|
9 |
|
10 |
#examples = [["wordsearch2.jpg","en"]]
|
11 |
examples = ["wordsearch2.jpg"]
|
|
|
14 |
# Please choose from: 'numpy', 'pil', 'filepath'.
|
15 |
inputs=gr.inputs.Image(type='filepath', label='Input'), #"en"],
|
16 |
#outputs=gr.outputs.Image(type='file', label='Output'),
|
17 |
+
outputs=gr.outputs.Image(type='file', label='Output'), #gr.outputs.Dataframe(type="array", headers=['text' , 'confidence'])],
|
18 |
examples = examples)
|
19 |
+
|
20 |
iface.launch(debug=True, enable_queue=True)
|