Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -74,7 +74,7 @@ def extract_features(sequence):
|
|
| 74 |
feature_array = np.array(feature_values).reshape(1, -1) # Reshape to (1, n_features) - CORRECT SHAPE
|
| 75 |
print(f"Shape of feature_array before normalization: {feature_array.shape}") # Debug print
|
| 76 |
|
| 77 |
-
normalized_features = scaler.transform(feature_array
|
| 78 |
normalized_features = normalized_features.flatten() # Flatten AFTER normalization if needed
|
| 79 |
|
| 80 |
|
|
@@ -84,7 +84,7 @@ def extract_features(sequence):
|
|
| 84 |
selected_feature_dict[feature] = normalized_features[i]
|
| 85 |
|
| 86 |
selected_feature_df = pd.DataFrame([selected_feature_dict])
|
| 87 |
-
selected_feature_array = selected_feature_df.
|
| 88 |
|
| 89 |
return selected_feature_array
|
| 90 |
|
|
|
|
| 74 |
feature_array = np.array(feature_values).reshape(1, -1) # Reshape to (1, n_features) - CORRECT SHAPE
|
| 75 |
print(f"Shape of feature_array before normalization: {feature_array.shape}") # Debug print
|
| 76 |
|
| 77 |
+
normalized_features = scaler.transform(feature_array) # Normalize - NO TRANSPOSE
|
| 78 |
normalized_features = normalized_features.flatten() # Flatten AFTER normalization if needed
|
| 79 |
|
| 80 |
|
|
|
|
| 84 |
selected_feature_dict[feature] = normalized_features[i]
|
| 85 |
|
| 86 |
selected_feature_df = pd.DataFrame([selected_feature_dict])
|
| 87 |
+
selected_feature_array = selected_feature_df.to_numpy()
|
| 88 |
|
| 89 |
return selected_feature_array
|
| 90 |
|