palbha commited on
Commit
b192aaf
·
verified ·
1 Parent(s): df33bb7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -63,8 +63,8 @@ def chat_with_gemini(user_input, history):
63
 
64
  def process_audio(audio, history):
65
  """Process audio input, convert to text, and get response."""
66
- if audio is None:
67
- return "No audio detected", history, None
68
 
69
  # Convert audio to text
70
  user_input = transcribe_audio(audio)
 
63
 
64
  def process_audio(audio, history):
65
  """Process audio input, convert to text, and get response."""
66
+ if not audio: # This checks for both None and empty input
67
+ return None, history, None
68
 
69
  # Convert audio to text
70
  user_input = transcribe_audio(audio)