Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -302,6 +302,14 @@ def process_and_query(input_language=None, audio_input=None, image_input=None, t
|
|
302 |
print(f"Image Input Type: {type(image_input)}, Audio Input Type: {type(audio_input)}")
|
303 |
|
304 |
# Process image input
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
305 |
if image_input is not None:
|
306 |
image_text = process_image(image_input)
|
307 |
combined_text += "\n\n**Image Input:**\n" + image_text
|
|
|
302 |
print(f"Image Input Type: {type(image_input)}, Audio Input Type: {type(audio_input)}")
|
303 |
|
304 |
# Process image input
|
305 |
+
if image_input is not None and isinstance(image_input, np.ndarray) and image_input.size > 0:
|
306 |
+
image_text = process_image(image_input)
|
307 |
+
combined_text += "\n\n**Image Input:**\n" + image_text
|
308 |
+
|
309 |
+
# Process audio input
|
310 |
+
if audio_input is not None and isinstance(audio_input, np.ndarray) and audio_input.size > 0:
|
311 |
+
audio_text = process_speech(input_language, audio_input)
|
312 |
+
combined_text += "\n\n**Audio Input:**\n" + audio_text# Process image input
|
313 |
if image_input is not None:
|
314 |
image_text = process_image(image_input)
|
315 |
combined_text += "\n\n**Image Input:**\n" + image_text
|