Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
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
|
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()
|