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