Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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)
|