zliang commited on
Commit
879dfbb
1 Parent(s): 79be27b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -18,7 +18,7 @@ table_class_index = 4 # class index for tables
18
 
19
  # Function to perform inference on an image and return bounding boxes for figures and tables
20
  def infer_image_and_get_boxes(image, confidence_threshold=0.6):
21
- results = model(image)
22
  boxes = [
23
  (int(box.xyxy[0][0]), int(box.xyxy[0][1]), int(box.xyxy[0][2]), int(box.xyxy[0][3]))
24
  for result in results for box in result.boxes
 
18
 
19
  # Function to perform inference on an image and return bounding boxes for figures and tables
20
  def infer_image_and_get_boxes(image, confidence_threshold=0.6):
21
+ results = model.predict(image)
22
  boxes = [
23
  (int(box.xyxy[0][0]), int(box.xyxy[0][1]), int(box.xyxy[0][2]), int(box.xyxy[0][3]))
24
  for result in results for box in result.boxes