Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -22,13 +22,13 @@ def analyze_image(img):
|
|
22 |
out = dp.as_dict()
|
23 |
out.pop("image")
|
24 |
|
25 |
-
return dp.viz(show_table_structure=False), out
|
26 |
|
27 |
inputs = [gr.inputs.Image(type='numpy', label="Original Image")]
|
28 |
-
outputs = [gr.outputs.Image(type="numpy", label="Output Image"), gr.JSON()]
|
29 |
|
30 |
title = "Deepdoctection - A Document AI Package"
|
31 |
-
description = "Demonstration of layout analysis and output of a document page."
|
32 |
|
33 |
examples = [['sample_1.jpg'],['sample_2.png']]
|
34 |
|
|
|
22 |
out = dp.as_dict()
|
23 |
out.pop("image")
|
24 |
|
25 |
+
return dp.viz(show_table_structure=False), dp.get_text(), out
|
26 |
|
27 |
inputs = [gr.inputs.Image(type='numpy', label="Original Image")]
|
28 |
+
outputs = [gr.outputs.Image(type="numpy", label="Output Image"), "text", gr.JSON()]
|
29 |
|
30 |
title = "Deepdoctection - A Document AI Package"
|
31 |
+
description = "Demonstration of layout analysis and output of a document page. This demo uses the deepdoctection analyzer with Tesseract's OCR engine. Models detect text, titles, tables, figures and lists as well as table cells. Based on the layout it determines reading order and generates an JSON output."
|
32 |
|
33 |
examples = [['sample_1.jpg'],['sample_2.png']]
|
34 |
|