Update project_model.py
Browse files- project_model.py +2 -2
project_model.py
CHANGED
|
@@ -196,7 +196,7 @@ def process_inputs(
|
|
| 196 |
|
| 197 |
if audio_path:
|
| 198 |
audio_text = whisper_pipe(audio_path)["text"]
|
| 199 |
-
question += " " + audio_text.strip()
|
| 200 |
|
| 201 |
# Add user's new question to the history
|
| 202 |
session.add_question(question)
|
|
@@ -204,7 +204,7 @@ def process_inputs(
|
|
| 204 |
|
| 205 |
# Sends current image and current question to Gemma 3
|
| 206 |
gemma_output = gemma_pipe(
|
| 207 |
-
image=session.
|
| 208 |
question=question,
|
| 209 |
max_new_tokens=500
|
| 210 |
)
|
|
|
|
| 196 |
|
| 197 |
if audio_path:
|
| 198 |
audio_text = whisper_pipe(audio_path)["text"]
|
| 199 |
+
question += 'You are a helpful visual assistant designed for visually impaired users that assists users by answering the following question. If unsure, say "I am not certain."' + audio_text.strip()
|
| 200 |
|
| 201 |
# Add user's new question to the history
|
| 202 |
session.add_question(question)
|
|
|
|
| 204 |
|
| 205 |
# Sends current image and current question to Gemma 3
|
| 206 |
gemma_output = gemma_pipe(
|
| 207 |
+
image=session.annotated_image,
|
| 208 |
question=question,
|
| 209 |
max_new_tokens=500
|
| 210 |
)
|