napatswift commited on
Commit
fa6bfc0
·
1 Parent(s): f8c7387

Add table dt

Browse files
Files changed (1) hide show
  1. main.py +6 -1
main.py CHANGED
@@ -26,7 +26,12 @@ def get_rec(points):
26
 
27
 
28
  def predict(image_input):
29
- return ocr(image_input)
 
 
 
 
 
30
 
31
  def run():
32
  demo = gr.Interface(
 
26
 
27
 
28
  def predict(image_input):
29
+ ocr_results = ocr(image_input)
30
+ table_results = inference_detector(table_det, image_input)
31
+ table_bboxes_list = [bboxes for bboxes, rois in table_results]
32
+ table_rois_list = [rois for bboxes, rois in table_results]
33
+
34
+ return {**ocr_results, 'table_bboxes': table_bboxes_list, 'table_rois': table_rois_list}
35
 
36
  def run():
37
  demo = gr.Interface(