Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -42,8 +42,8 @@ def predict_voice(audio_file_path):
|
|
42 |
features = custom_feature_extraction(audio_file_path)
|
43 |
|
44 |
with torch.no_grad():
|
45 |
-
#
|
46 |
-
outputs = model(
|
47 |
|
48 |
logits = outputs.logits
|
49 |
predicted_index = logits.argmax()
|
|
|
42 |
features = custom_feature_extraction(audio_file_path)
|
43 |
|
44 |
with torch.no_grad():
|
45 |
+
# Corrected: Directly pass the features tensor to the model
|
46 |
+
outputs = model(features)
|
47 |
|
48 |
logits = outputs.logits
|
49 |
predicted_index = logits.argmax()
|