Tonic commited on
Commit
751b072
1 Parent(s): 7bb5314

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -303,12 +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 image_input is not None and (isinstance(image_input, np.ndarray) and image_input.size > 0):
307
  image_text = process_image(image_input)
308
  combined_text += "\n\n**Image Input:**\n" + image_text
309
 
310
  # Process audio input
311
- elif audio_input is not None and (isinstance(audio_input, np.ndarray) and audio_input.size > 0):
312
  audio_text = process_speech(input_language, audio_input)
313
  combined_text += "\n\n**Audio Input:**\n" + audio_text
314
 
 
303
  print(f"Image Input Type: {type(image_input)}, Audio Input Type: {type(audio_input)}")
304
 
305
  # Process image input
306
+ if image_input is not None:
307
  image_text = process_image(image_input)
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