programmnix-askui commited on
Commit
51ee71b
Β·
1 Parent(s): a4653c3

test input

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -109,11 +109,11 @@ def deepseek(image, text_input):
109
 
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, scaled_boxes, draw_bounding_boxes(image, scaled_boxes)
117
 
118
 
119
  @spaces.GPU
 
109
 
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)
117
 
118
 
119
  @spaces.GPU