Spaces:
Runtime error
Runtime error
Commit
Β·
7d35129
1
Parent(s):
c333dca
test input
Browse files
app.py
CHANGED
|
@@ -110,16 +110,14 @@ def deepseek(image, text_input, model_id):
|
|
| 110 |
return text_input, [], image
|
| 111 |
|
| 112 |
det_content = det_match.group(1)
|
| 113 |
-
bbox = [
|
| 114 |
-
#w, h = image.size
|
| 115 |
-
#bbox = [[bbox[0] * w, bbox[1] * h, bbox[2] * w, bbox[3] * h]]
|
| 116 |
|
| 117 |
scaled_boxes = rescale_bounding_boxes([bbox], image.width, image.height)
|
| 118 |
-
return
|
| 119 |
|
| 120 |
|
| 121 |
@spaces.GPU
|
| 122 |
-
def run_example(image, text_input, model_id="
|
| 123 |
return deepseek(image, text_input, model_id)
|
| 124 |
|
| 125 |
css = """
|
|
|
|
| 110 |
return text_input, [], image
|
| 111 |
|
| 112 |
det_content = det_match.group(1)
|
| 113 |
+
bbox = [int(v.strip()) for v in det_content.split(",")]
|
|
|
|
|
|
|
| 114 |
|
| 115 |
scaled_boxes = rescale_bounding_boxes([bbox], image.width, image.height)
|
| 116 |
+
return answer, scaled_boxes, draw_bounding_boxes(image, scaled_boxes)
|
| 117 |
|
| 118 |
|
| 119 |
@spaces.GPU
|
| 120 |
+
def run_example(image, text_input, model_id="eepseek-ai/deepseek-vl2-tiny"):
|
| 121 |
return deepseek(image, text_input, model_id)
|
| 122 |
|
| 123 |
css = """
|