desiree commited on
Commit
bb4fe56
·
verified ·
1 Parent(s): 75293ad

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -91,7 +91,7 @@ def analyze_audio(audio_path: str, question: str = None) -> str:
91
 
92
  # Process audio
93
  audio_data = process_audio(audio_path)
94
- if audio_data is None:
95
  return "Failed to process the audio file. Please ensure it's a valid audio format."
96
 
97
  try:
@@ -177,4 +177,4 @@ demo = gr.Interface(
177
  )
178
 
179
  if __name__ == "__main__":
180
- demo.launch()
 
91
 
92
  # Process audio
93
  audio_data = process_audio(audio_path)
94
+ if not audio_data or "audio" not in audio_data or "sampling_rate" not in audio_data:
95
  return "Failed to process the audio file. Please ensure it's a valid audio format."
96
 
97
  try:
 
177
  )
178
 
179
  if __name__ == "__main__":
180
+ demo.launch()