sussahoo commited on
Commit
a1fee24
·
1 Parent(s): 6832b12

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -385,7 +385,7 @@ def process_image(image):
385
  expand_rowcol_bbox_bottom = 0
386
 
387
  image = image.convert("RGB")
388
- model, probas, bboxes_scaled = table_detector(image, THRESHOLD_PROBA=td_threshold)
389
  # plot_results_detection(model, image, probas, bboxes_scaled, delta_xmin, delta_ymin, delta_xmax, delta_ymax)
390
  cropped_img_list = crop_tables(
391
  image, probas, bboxes_scaled, delta_xmin, delta_ymin, delta_xmax, delta_ymax
@@ -397,7 +397,7 @@ def process_image(image):
397
  unpadded_table, padd_top, padd_right, padd_bottom, padd_left
398
  )
399
  model, probas, bboxes_scaled = table_struct_recog(
400
- table, THRESHOLD_PROBA=tsr_threshold
401
  )
402
  rows, cols = generate_structure(
403
  model,
@@ -444,3 +444,4 @@ iface = gr.Interface(
444
  )
445
  iface.launch(debug=True)
446
 
 
 
385
  expand_rowcol_bbox_bottom = 0
386
 
387
  image = image.convert("RGB")
388
+ model, probas, bboxes_scaled = table_detector(image, THRESHOLD_PROBA=TD_THRESHOLD)
389
  # plot_results_detection(model, image, probas, bboxes_scaled, delta_xmin, delta_ymin, delta_xmax, delta_ymax)
390
  cropped_img_list = crop_tables(
391
  image, probas, bboxes_scaled, delta_xmin, delta_ymin, delta_xmax, delta_ymax
 
397
  unpadded_table, padd_top, padd_right, padd_bottom, padd_left
398
  )
399
  model, probas, bboxes_scaled = table_struct_recog(
400
+ table, THRESHOLD_PROBA=TSR_THRESHOLD
401
  )
402
  rows, cols = generate_structure(
403
  model,
 
444
  )
445
  iface.launch(debug=True)
446
 
447
+