Tonic commited on
Commit
47df781
·
1 Parent(s): 17b13ec

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -299,12 +299,12 @@ def process_and_query(input_language=None, audio_input=None, image_input=None, t
299
  markdown_output = "" # Initialize markdown_output
300
 
301
  # Process image input
302
- if image_input is not None:
303
  image_text = process_image(image_input)
304
  combined_text += "\n\n**Image Input:**\n" + image_text
305
 
306
  # Process audio input
307
- if audio_input is not None:
308
  audio_text = process_speech(input_language, audio_input)
309
  combined_text += "\n\n**Audio Input:**\n" + audio_text
310
 
 
299
  markdown_output = "" # Initialize markdown_output
300
 
301
  # Process image input
302
+ if image_input is not None and not (isinstance(image_input, np.ndarray) and image_input.size == 0):
303
  image_text = process_image(image_input)
304
  combined_text += "\n\n**Image Input:**\n" + image_text
305
 
306
  # Process audio input
307
+ if audio_input is not None and not (isinstance(audio_input, np.ndarray) and audio_input.size == 0):
308
  audio_text = process_speech(input_language, audio_input)
309
  combined_text += "\n\n**Audio Input:**\n" + audio_text
310