Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -164,16 +164,14 @@ def prepare_test_messages(image, prompt):
|
|
164 |
image.save(buffered, format="JPEG")
|
165 |
img_base64 = base64.b64encode(buffered.getvalue()).decode('utf-8')
|
166 |
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
else:
|
176 |
-
SYSTEM_PROMPT = "You're a helpful visual assistant."
|
177 |
|
178 |
messages = [
|
179 |
{"role": "system", "content": [{"type": "text", "text": SYSTEM_PROMPT}]},
|
|
|
164 |
image.save(buffered, format="JPEG")
|
165 |
img_base64 = base64.b64encode(buffered.getvalue()).decode('utf-8')
|
166 |
|
167 |
+
SYSTEM_PROMPT = (
|
168 |
+
"A conversation between User and Assistant. The user asks a question, and the Assistant solves it. The assistant "
|
169 |
+
"first thinks about the reasoning process in the mind and then provides the user with the answer. The reasoning "
|
170 |
+
"process should enclosed within <think> </think> tags, and the bounding box, points and points labels should be enclosed within <bbox></bbox>, <points></points>, and <labels></labels>, respectively. i.e., "
|
171 |
+
"<think> reasoning process here </think> <bbox>[x1,y1,x2,y2]</bbox>, <points>[[x3,y3],[x4,y4],...]</points>, <labels>[1,0,...]</labels>"
|
172 |
+
"Where 1 indicates a foreground (object) point, and 0 indicates a background point."
|
173 |
+
)
|
174 |
+
|
|
|
|
|
175 |
|
176 |
messages = [
|
177 |
{"role": "system", "content": [{"type": "text", "text": SYSTEM_PROMPT}]},
|