Spaces:
Runtime error
Runtime error
Commit
Β·
f78e9ad
1
Parent(s):
51ee71b
test input
Browse files
app.py
CHANGED
@@ -110,7 +110,7 @@ def deepseek(image, text_input):
|
|
110 |
det_content = re.search(det_pattern, answer).group(1)
|
111 |
bbox = [ int(v.strip()) / 999 for v in det_content.split(",")]
|
112 |
w, h = image.size
|
113 |
-
bbox = [bbox[0] * w, bbox[1] * h, bbox[2] * w, bbox[3] * h]
|
114 |
|
115 |
#scaled_boxes = rescale_bounding_boxes([bbox], image.width, image.height)
|
116 |
return text_input, bbox, draw_bounding_boxes(image, bbox)
|
|
|
110 |
det_content = re.search(det_pattern, answer).group(1)
|
111 |
bbox = [ int(v.strip()) / 999 for v in det_content.split(",")]
|
112 |
w, h = image.size
|
113 |
+
bbox = [[bbox[0] * w, bbox[1] * h, bbox[2] * w, bbox[3] * h]]
|
114 |
|
115 |
#scaled_boxes = rescale_bounding_boxes([bbox], image.width, image.height)
|
116 |
return text_input, bbox, draw_bounding_boxes(image, bbox)
|