spycoder commited on
Commit
7654888
·
1 Parent(s): 55acf81

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -57,8 +57,10 @@ def predict(microphone,file_upload):
57
 
58
  elif (microphone is None) and (file_upload is None):
59
  return "ERROR: You have to either use the microphone or upload an audio file"
60
- if(microphone is not None) file_path = microphone
61
- if(file_upload is not None) file_path = file_upload
 
 
62
 
63
  model.eval()
64
  with torch.no_grad():
 
57
 
58
  elif (microphone is None) and (file_upload is None):
59
  return "ERROR: You have to either use the microphone or upload an audio file"
60
+ if(microphone is not None):
61
+ file_path = microphone
62
+ if(file_upload is not None):
63
+ file_path = file_upload
64
 
65
  model.eval()
66
  with torch.no_grad():