saa231 commited on
Commit
5c2f968
·
verified ·
1 Parent(s): 52613c9

Update project_model.py

Browse files
Files changed (1) hide show
  1. project_model.py +4 -7
project_model.py CHANGED
@@ -208,13 +208,10 @@ def process_inputs(
208
  # "text": question + " " + session.visual_context # Question and visual context combined as text
209
  #}
210
 
211
- gemma_input = [{
212
- "role": "user",
213
- "content": [
214
- {"type": "images", "images": session.current_image}, # Image context
215
- {"type": "text", "text": question + " " + session.visual_context} # Question and visual context combined as text
216
- ]
217
- }]
218
 
219
  # Process the input through Gemma
220
  gemma_output = gemma_pipe(gemma_input)
 
208
  # "text": question + " " + session.visual_context # Question and visual context combined as text
209
  #}
210
 
211
+ gemma_input = {
212
+ "images": session.current_image, # Image context
213
+ "text": question + " This is the shared visual context: " + session.visual_context # Question and visual context combined as text
214
+ }
 
 
 
215
 
216
  # Process the input through Gemma
217
  gemma_output = gemma_pipe(gemma_input)