JaMe76 commited on
Commit
3b9c7e0
1 Parent(s): 95ea484

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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), 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."
 
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."