maxiw commited on
Commit
092c8d2
·
verified ·
1 Parent(s): ac2e7e1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
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": f"Give a bounding box for {text_input}"},
 
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
  ]