Update app.py
Browse files
app.py
CHANGED
|
@@ -8,6 +8,7 @@ from project_model import process_inputs, session
|
|
| 8 |
def handle_question(image, audio):
|
| 9 |
try:
|
| 10 |
if image and audio: # Handle the initial question with image and audio
|
|
|
|
| 11 |
message, answer_audio = process_inputs(session, image=image, audio_path=audio)
|
| 12 |
|
| 13 |
# Save images
|
|
@@ -33,7 +34,7 @@ def handle_question(image, audio):
|
|
| 33 |
#f"</audio>"
|
| 34 |
)
|
| 35 |
elif audio: # Handle follow-up with just audio
|
| 36 |
-
|
| 37 |
if not session.current_image:
|
| 38 |
return "No initial image found for the follow-up question.", None
|
| 39 |
|
|
|
|
| 8 |
def handle_question(image, audio):
|
| 9 |
try:
|
| 10 |
if image and audio: # Handle the initial question with image and audio
|
| 11 |
+
session.current_image = image
|
| 12 |
message, answer_audio = process_inputs(session, image=image, audio_path=audio)
|
| 13 |
|
| 14 |
# Save images
|
|
|
|
| 34 |
#f"</audio>"
|
| 35 |
)
|
| 36 |
elif audio: # Handle follow-up with just audio
|
| 37 |
+
|
| 38 |
if not session.current_image:
|
| 39 |
return "No initial image found for the follow-up question.", None
|
| 40 |
|