Update project_model.py
Browse files- 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 |
-
"
|
| 213 |
-
|
| 214 |
-
|
| 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)
|