Spaces:
Runtime error
Runtime error
app.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
-
def wordsrch(img
|
| 4 |
-
|
| 5 |
#ocrimg = gr.Interface.load("spaces/PaddlePaddle/PaddleOCR")(img, lang)
|
| 6 |
ocrimg = gr.Interface.load("spaces/tomofi/EasyOCR")(img, lang)[0]
|
| 7 |
return ocrimg #, dframe
|
|
@@ -11,7 +11,7 @@ examples = ["wordsearch2.jpg"]
|
|
| 11 |
|
| 12 |
iface = gr.Interface(fn=wordsrch,
|
| 13 |
# Please choose from: 'numpy', 'pil', 'filepath'.
|
| 14 |
-
inputs=
|
| 15 |
#outputs=gr.outputs.Image(type='file', label='Output'),
|
| 16 |
outputs=gr.outputs.Image(type='file', label='Output'), #gr.outputs.Dataframe(headers=['text', 'confidence'])],
|
| 17 |
examples = examples)
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
+
def wordsrch(img):
|
| 4 |
+
lang = "en"
|
| 5 |
#ocrimg = gr.Interface.load("spaces/PaddlePaddle/PaddleOCR")(img, lang)
|
| 6 |
ocrimg = gr.Interface.load("spaces/tomofi/EasyOCR")(img, lang)[0]
|
| 7 |
return ocrimg #, dframe
|
|
|
|
| 11 |
|
| 12 |
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=gr.outputs.Image(type='file', label='Output'), #gr.outputs.Dataframe(headers=['text', 'confidence'])],
|
| 17 |
examples = examples)
|