saa231 commited on
Commit
69a31d8
·
verified ·
1 Parent(s): 070fc32

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -30,7 +30,11 @@ def handle_question(image, audio):
30
  #f"</audio>"
31
  )
32
  elif audio: # Handle follow-up with just audio
33
- message, answer_audio = process_inputs(session, audio_path=audio)
 
 
 
 
34
 
35
  # Save the current image if it exists
36
  original_path = "uploaded_image.png"
 
30
  #f"</audio>"
31
  )
32
  elif audio: # Handle follow-up with just audio
33
+
34
+ if not session.current_image:
35
+ return "No initial image found for the follow-up question.", None
36
+
37
+ message, answer_audio = process_inputs(session, image=session.current_image, audio_path=audio)
38
 
39
  # Save the current image if it exists
40
  original_path = "uploaded_image.png"