Update project_model.py
Browse files- project_model.py +4 -1
project_model.py
CHANGED
|
@@ -195,11 +195,14 @@ def process_inputs(
|
|
| 195 |
# Add user's new question to the history
|
| 196 |
session.add_question(question)
|
| 197 |
|
|
|
|
|
|
|
|
|
|
| 198 |
# Gemma answer
|
| 199 |
messages = [{
|
| 200 |
"role": "user",
|
| 201 |
"content": [
|
| 202 |
-
{"type": "image", "image":
|
| 203 |
{"type": "text", "text": vqa_prompt}
|
| 204 |
]
|
| 205 |
}]
|
|
|
|
| 195 |
# Add user's new question to the history
|
| 196 |
session.add_question(question)
|
| 197 |
|
| 198 |
+
|
| 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 answer
|
| 202 |
messages = [{
|
| 203 |
"role": "user",
|
| 204 |
"content": [
|
| 205 |
+
{"type": "image", "image": self.current_image},
|
| 206 |
{"type": "text", "text": vqa_prompt}
|
| 207 |
]
|
| 208 |
}]
|