Update app.py
Browse files
app.py
CHANGED
|
@@ -38,10 +38,10 @@ def detect_scream(audio_path):
|
|
| 38 |
return f"Detected: {label} ({score:.1f}%) — Alert Level: {alert}"
|
| 39 |
|
| 40 |
def process_uploaded(audio_file):
|
| 41 |
-
# audio_file is a
|
| 42 |
-
wav_path = convert_audio(audio_file.name)
|
| 43 |
return detect_scream(wav_path)
|
| 44 |
|
|
|
|
| 45 |
iface = gr.Interface(
|
| 46 |
fn=process_uploaded,
|
| 47 |
inputs=gr.Audio(type="filepath"),
|
|
|
|
| 38 |
return f"Detected: {label} ({score:.1f}%) — Alert Level: {alert}"
|
| 39 |
|
| 40 |
def process_uploaded(audio_file):
|
| 41 |
+
wav_path = convert_audio(audio_file) # audio_file is already a path string
|
|
|
|
| 42 |
return detect_scream(wav_path)
|
| 43 |
|
| 44 |
+
|
| 45 |
iface = gr.Interface(
|
| 46 |
fn=process_uploaded,
|
| 47 |
inputs=gr.Audio(type="filepath"),
|