saa231 commited on
Commit
cfa5da5
·
verified ·
1 Parent(s): e5bea4b

Update project_model.py

Browse files
Files changed (1) hide show
  1. 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": pil_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
  }]