saa231 commited on
Commit
727b8c6
·
verified ·
1 Parent(s): 8435f69

Update project_model.py

Browse files
Files changed (1) hide show
  1. 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.current_image,
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
  )