Update app.py
Browse files
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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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"
|