Spaces:
Sleeping
Sleeping
sotirios-slv
commited on
Commit
•
bb67d5e
1
Parent(s):
2769653
Updated image debugging info
Browse files
app.py
CHANGED
@@ -35,6 +35,8 @@ def get_named_entities(ocr_text: str):
|
|
35 |
|
36 |
|
37 |
def run(image, lang="eng"):
|
|
|
|
|
38 |
result = pytesseract.image_to_string(image, lang=None if lang == [] else lang)
|
39 |
|
40 |
ner = get_named_entities(result)
|
@@ -70,8 +72,6 @@ with gr.Blocks() as demo:
|
|
70 |
image_in = gr.Image(type="pil")
|
71 |
lang = gr.Dropdown(choices, value="eng")
|
72 |
btn = gr.Button("Run")
|
73 |
-
print("image_in", image_in.name)
|
74 |
-
print("image_in type", type(image_in))
|
75 |
with gr.Column():
|
76 |
ocr_text = gr.TextArea(label="OCR output")
|
77 |
with gr.Column():
|
|
|
35 |
|
36 |
|
37 |
def run(image, lang="eng"):
|
38 |
+
print("Image ", image)
|
39 |
+
print("Image type ", type(image))
|
40 |
result = pytesseract.image_to_string(image, lang=None if lang == [] else lang)
|
41 |
|
42 |
ner = get_named_entities(result)
|
|
|
72 |
image_in = gr.Image(type="pil")
|
73 |
lang = gr.Dropdown(choices, value="eng")
|
74 |
btn = gr.Button("Run")
|
|
|
|
|
75 |
with gr.Column():
|
76 |
ocr_text = gr.TextArea(label="OCR output")
|
77 |
with gr.Column():
|