Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -22,10 +22,10 @@ def analyze_image(img):
|
|
22 |
out = dp.as_dict()
|
23 |
out.pop("image")
|
24 |
|
25 |
-
return dp.viz(show_table_structure=False),
|
26 |
|
27 |
inputs = [gr.inputs.Image(type='numpy', label="Original Image")]
|
28 |
-
outputs = [gr.outputs.Image(type="numpy", label="Output Image"),
|
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."
|
|
|
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. 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."
|