maxiw commited on
Commit
9b70520
Β·
verified Β·
1 Parent(s): bf9c4d3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -96,7 +96,7 @@ def run_example(image, text_input, system_prompt, model_id="OS-Copilot/OS-Atlas-
96
  box_content = re.search(box_pattern, text).group(1)
97
 
98
  boxes = [tuple(map(int, pair.strip("()").split(','))) for pair in box_content.split("),(")]
99
- boxes = [boxes[0][0], boxes[0][1], boxes[1][0], boxes[1][1]]
100
 
101
  scaled_boxes = rescale_bounding_boxes(boxes, image.width, image.height)
102
  return output_text, boxes, draw_bounding_boxes(image, scaled_boxes)
 
96
  box_content = re.search(box_pattern, text).group(1)
97
 
98
  boxes = [tuple(map(int, pair.strip("()").split(','))) for pair in box_content.split("),(")]
99
+ boxes = [[boxes[0][0], boxes[0][1], boxes[1][0], boxes[1][1]]]
100
 
101
  scaled_boxes = rescale_bounding_boxes(boxes, image.width, image.height)
102
  return output_text, boxes, draw_bounding_boxes(image, scaled_boxes)