Komal133 commited on
Commit
4ee6a10
·
verified ·
1 Parent(s): 892bc92

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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 temp file path from gradio
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"),