Spaces:
Sleeping
Sleeping
deveix
commited on
Commit
·
907ce3c
1
Parent(s):
5e0a3f7
fix
Browse files- app/main.py +2 -2
app/main.py
CHANGED
@@ -332,12 +332,12 @@ async def handle_audio(file: UploadFile = File(...)):
|
|
332 |
# features = extract_features(temp_filename)
|
333 |
print("Extracted Features:", features)
|
334 |
# features = pca.transform(features)
|
335 |
-
features = np.array(features).reshape(1, -1)
|
336 |
|
337 |
features = scaler.transform(features)
|
338 |
|
339 |
# proceed with an inference
|
340 |
-
results = model.predict(features)
|
341 |
# decoded_predictions = [label_encoder.classes_[i] for i in results]
|
342 |
|
343 |
# # Decode the predictions using the label encoder
|
|
|
332 |
# features = extract_features(temp_filename)
|
333 |
print("Extracted Features:", features)
|
334 |
# features = pca.transform(features)
|
335 |
+
# features = np.array(features).reshape(1, -1)
|
336 |
|
337 |
features = scaler.transform(features)
|
338 |
|
339 |
# proceed with an inference
|
340 |
+
results = model.predict([features])
|
341 |
# decoded_predictions = [label_encoder.classes_[i] for i in results]
|
342 |
|
343 |
# # Decode the predictions using the label encoder
|