Update app.py
Browse files
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)
|
61 |
-
|
|
|
|
|
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():
|