Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -308,16 +308,16 @@ def process_and_query(input_language=None, audio_input=None, image_input=None, t
|
|
| 308 |
combined_text += "\n\n**Image Input:**\n" + image_text
|
| 309 |
|
| 310 |
# Process audio input
|
| 311 |
-
|
| 312 |
audio_text = process_speech(input_language, audio_input)
|
| 313 |
combined_text += "\n\n**Audio Input:**\n" + audio_text
|
| 314 |
|
| 315 |
# Process text input
|
| 316 |
-
|
| 317 |
combined_text += "The user asks the following to his health adviser: " + text_input
|
| 318 |
|
| 319 |
# Check if combined text is empty
|
| 320 |
-
|
| 321 |
return "Error: Please provide some input (text, audio, or image)."
|
| 322 |
|
| 323 |
# Append the original image description in Markdown
|
|
|
|
| 308 |
combined_text += "\n\n**Image Input:**\n" + image_text
|
| 309 |
|
| 310 |
# Process audio input
|
| 311 |
+
elif audio_input is not None:
|
| 312 |
audio_text = process_speech(input_language, audio_input)
|
| 313 |
combined_text += "\n\n**Audio Input:**\n" + audio_text
|
| 314 |
|
| 315 |
# Process text input
|
| 316 |
+
elif text_input is not None and text_input.strip():
|
| 317 |
combined_text += "The user asks the following to his health adviser: " + text_input
|
| 318 |
|
| 319 |
# Check if combined text is empty
|
| 320 |
+
else
|
| 321 |
return "Error: Please provide some input (text, audio, or image)."
|
| 322 |
|
| 323 |
# Append the original image description in Markdown
|