Spaces:
Running
Running
gizemsarsinlar
commited on
Commit
•
2d479ac
1
Parent(s):
99c671a
Update app.py
Browse files
app.py
CHANGED
@@ -12,12 +12,6 @@ def tesseract_ocr(filepath: str, languages: List[str]=None):
|
|
12 |
title = "Tesseract OCR"
|
13 |
description = "Gradio demo for Tesseract. Tesseract is an open source text recognition (OCR) Engine."
|
14 |
article = "<p style='text-align: center'><a href='https://tesseract-ocr.github.io/' target='_blank'>Tesseract documentation</a> | <a href='https://github.com/tesseract-ocr/tesseract' target='_blank'>Github Repo</a></p>"
|
15 |
-
examples = [
|
16 |
-
["examples/weird_unicode_math_symbols.png", []],
|
17 |
-
["examples/eurotext.png", ["eng"]],
|
18 |
-
["examples/tesseract_sample.png", ["jpn", "eng"]],
|
19 |
-
["examples/chi.jpg", ["HanS", "HanT"]],
|
20 |
-
]
|
21 |
|
22 |
with gr.Blocks(title=title) as demo:
|
23 |
gr.Markdown(f'<h1 style="text-align: center; margin-bottom: 1rem;">{title}</h1>')
|
@@ -37,10 +31,7 @@ with gr.Blocks(title=title) as demo:
|
|
37 |
btn_submit.click(tesseract_ocr, inputs=[image, languages], outputs=text, api_name="tesseract-ocr")
|
38 |
btn_clear.add(text)
|
39 |
|
40 |
-
|
41 |
-
examples=examples,
|
42 |
-
inputs=[image, languages],
|
43 |
-
)
|
44 |
|
45 |
gr.Markdown(article)
|
46 |
|
|
|
12 |
title = "Tesseract OCR"
|
13 |
description = "Gradio demo for Tesseract. Tesseract is an open source text recognition (OCR) Engine."
|
14 |
article = "<p style='text-align: center'><a href='https://tesseract-ocr.github.io/' target='_blank'>Tesseract documentation</a> | <a href='https://github.com/tesseract-ocr/tesseract' target='_blank'>Github Repo</a></p>"
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
|
16 |
with gr.Blocks(title=title) as demo:
|
17 |
gr.Markdown(f'<h1 style="text-align: center; margin-bottom: 1rem;">{title}</h1>')
|
|
|
31 |
btn_submit.click(tesseract_ocr, inputs=[image, languages], outputs=text, api_name="tesseract-ocr")
|
32 |
btn_clear.add(text)
|
33 |
|
34 |
+
|
|
|
|
|
|
|
35 |
|
36 |
gr.Markdown(article)
|
37 |
|