macaodha commited on
Commit
7475d7b
1 Parent(s): 345c11d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -40,7 +40,7 @@ def make_prediction(file_name=None, detection_threshold=0.3):
40
  else:
41
  return "You must provide an input audio file."
42
 
43
- if detection_threshold != '':
44
  args['detection_threshold'] = float(detection_threshold)
45
 
46
  results = du.process_file(audio_file, model, params, args, max_duration=5.0)
 
40
  else:
41
  return "You must provide an input audio file."
42
 
43
+ if detection_threshold is not None and detection_threshold != '':
44
  args['detection_threshold'] = float(detection_threshold)
45
 
46
  results = du.process_file(audio_file, model, params, args, max_duration=5.0)