Update project_model.py
Browse files- project_model.py +2 -8
project_model.py
CHANGED
|
@@ -199,17 +199,11 @@ def process_inputs(
|
|
| 199 |
vqa_prompt = "You are a helpful visual assistant designed for visually impaired users that assists users by answering their questions. Answer the following question with the help of the shared visual context: " + question + "Shared visual context: " + visual_context
|
| 200 |
|
| 201 |
# Gemma prompt input
|
| 202 |
-
messages = [
|
| 203 |
-
{
|
| 204 |
-
"role": "assistant",
|
| 205 |
-
"content": "You are a helpful visual assistant designed for visually impaired users."
|
| 206 |
-
},
|
| 207 |
-
{
|
| 208 |
"role": "user",
|
| 209 |
"content": [
|
| 210 |
{"type": "image", "image": session.current_image},
|
| 211 |
-
{"type": "text", "text": vqa_prompt}
|
| 212 |
-
]
|
| 213 |
}]
|
| 214 |
|
| 215 |
# Call to gemma_pipe
|
|
|
|
| 199 |
vqa_prompt = "You are a helpful visual assistant designed for visually impaired users that assists users by answering their questions. Answer the following question with the help of the shared visual context: " + question + "Shared visual context: " + visual_context
|
| 200 |
|
| 201 |
# Gemma prompt input
|
| 202 |
+
messages = [{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 203 |
"role": "user",
|
| 204 |
"content": [
|
| 205 |
{"type": "image", "image": session.current_image},
|
| 206 |
+
{"type": "text", "text": vqa_prompt}]
|
|
|
|
| 207 |
}]
|
| 208 |
|
| 209 |
# Call to gemma_pipe
|