saa231 commited on
Commit
b72cd3e
·
verified ·
1 Parent(s): 6023582

Update project_model.py

Browse files
Files changed (1) hide show
  1. project_model.py +2 -6
project_model.py CHANGED
@@ -204,12 +204,8 @@ def process_inputs(
204
 
205
  # Create the structured input for Gemma, including image, question, and visual context
206
  gemma_input = {
207
- "role": "user", # This indicates it's the user's turn
208
- "content": [
209
- {"type": "image", "image": session.annotated_image}, # Annotated image
210
- {"type": "text", "text": question}, # The question the user asks
211
- {"type": "text", "text": session.visual_context} # Visual context generated from the image
212
- ]
213
  }
214
 
215
  # Process the input through Gemma
 
204
 
205
  # Create the structured input for Gemma, including image, question, and visual context
206
  gemma_input = {
207
+ "image": session.annotated_image, # Image context
208
+ "text": question + " " + session.visual_context # Question and visual context combined as text
 
 
 
 
209
  }
210
 
211
  # Process the input through Gemma