Files changed (1) hide show
  1. app.py +9 -1
app.py CHANGED
@@ -164,7 +164,15 @@ def detect_and_crop_table(image):
164
  # image = fig2img(fig)
165
 
166
  # crop first detected table out of image
167
- cropped_table = image.crop(detected_tables[0]["bbox"])
 
 
 
 
 
 
 
 
168
 
169
  return cropped_table
170
 
 
164
  # image = fig2img(fig)
165
 
166
  # crop first detected table out of image
167
+ # added 30 in co-ordinate to avoide table border missing
168
+ coordinates = detected_tables[0]["bbox"]
169
+ modified_coordinates = [
170
+ coordinates[0] - 30,
171
+ coordinates[1] - 30,
172
+ coordinates[2] + 30,
173
+ coordinates[3] + 30]
174
+
175
+ cropped_table = image.crop(modified_coordinates)
176
 
177
  return cropped_table
178