Spaces:
Runtime error
Runtime error
app.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 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,8 +11,8 @@ examples = ["wordsearch2.jpg"]
|
|
| 11 |
|
| 12 |
iface = gr.Interface(fn=wordsrch,
|
| 13 |
# Please choose from: 'numpy', 'pil', 'filepath'.
|
| 14 |
-
inputs=gr.inputs.Image(type='filepath', label='Input'),
|
| 15 |
#outputs=gr.outputs.Image(type='file', label='Output'),
|
| 16 |
-
outputs=
|
| 17 |
examples = examples)
|
| 18 |
iface.launch(debug=True, enable_queue=True)
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
+
def wordsrch(img, lang):
|
| 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)
|
| 18 |
iface.launch(debug=True, enable_queue=True)
|