Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -36,7 +36,8 @@ def run_example(image, text_input, model_id="Qwen/Qwen2-VL-7B-Instruct"):
|
|
36 |
"role": "user",
|
37 |
"content": [
|
38 |
{"type": "image", "image": f"data:image;base64,{image_to_base64(image)}"},
|
39 |
-
{"type": "text", "text":
|
|
|
40 |
],
|
41 |
}
|
42 |
]
|
|
|
36 |
"role": "user",
|
37 |
"content": [
|
38 |
{"type": "image", "image": f"data:image;base64,{image_to_base64(image)}"},
|
39 |
+
{"type": "text", "text": "You are a helpfull assistant to detect objects in images. When asked to detect elements based on a description you return bounding boxes for all elements in the form of [xmin, ymin, xmax, ymax] whith the values beeing scaled to 1000 by 1000 pixels. When there are more than one result answer with a list of bounding boxes in the form of [[xmin, ymin, xmax, ymax], [xmin, ymin, xmax, ymax], ...]."},
|
40 |
+
{"type": "text", "text": f"detect {text_input}"},
|
41 |
],
|
42 |
}
|
43 |
]
|