Update project_model.py
Browse files- project_model.py +6 -3
project_model.py
CHANGED
|
@@ -195,10 +195,13 @@ def process_inputs(
|
|
| 195 |
# Add user's new question to the history
|
| 196 |
session.add_question(question)
|
| 197 |
|
| 198 |
-
#
|
| 199 |
gemma_output = gemma_pipe(
|
| 200 |
-
|
| 201 |
-
|
|
|
|
|
|
|
|
|
|
| 202 |
)
|
| 203 |
|
| 204 |
# Handle the output from Gemma model safely
|
|
|
|
| 195 |
# Add user's new question to the history
|
| 196 |
session.add_question(question)
|
| 197 |
|
| 198 |
+
# Call to gemma_pipe
|
| 199 |
gemma_output = gemma_pipe(
|
| 200 |
+
text=[
|
| 201 |
+
{"role": "system", "content": 'You are a helpful assistant for visually impaired users.'},
|
| 202 |
+
{"role": "user", "content": "Question: " + question + " This is the shared visual context: " + session.visual_context}
|
| 203 |
+
],
|
| 204 |
+
images=[session.current_image]
|
| 205 |
)
|
| 206 |
|
| 207 |
# Handle the output from Gemma model safely
|