Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -476,9 +476,8 @@ elif option == "SML Classification":
|
|
| 476 |
'Income Bracket': [income_bracket] # Directly use Income Bracket as numerical
|
| 477 |
})
|
| 478 |
|
| 479 |
-
|
| 480 |
-
|
| 481 |
-
columns=ohe.get_feature_names_out(['Place of living', 'Education Level', 'Age Group']))
|
| 482 |
|
| 483 |
# Combine categorical and numerical features
|
| 484 |
features = pd.concat([num_features, cat_encoded], axis=1)
|
|
|
|
| 476 |
'Income Bracket': [income_bracket] # Directly use Income Bracket as numerical
|
| 477 |
})
|
| 478 |
|
| 479 |
+
cat_encoded = pd.DataFrame(ohe.transform(cat_features),
|
| 480 |
+
columns=ohe.get_feature_names_out(['Place of living', 'Education Level', 'Age Group']))
|
|
|
|
| 481 |
|
| 482 |
# Combine categorical and numerical features
|
| 483 |
features = pd.concat([num_features, cat_encoded], axis=1)
|