Spaces:
Sleeping
Sleeping
using .jolib models instead .pkl
Browse files
app.py
CHANGED
|
@@ -6,12 +6,12 @@ import os
|
|
| 6 |
|
| 7 |
# Load all trained models
|
| 8 |
models = {
|
| 9 |
-
"Logistic Regression": joblib.load('logistic_regression_model.
|
| 10 |
-
"Random Forest": joblib.load('random_forest_model.
|
| 11 |
-
"Support Vector Machine (SVM)": joblib.load('svm_model.
|
| 12 |
-
"Decision Tree": joblib.load('decision_tree_model.
|
| 13 |
-
"XGBoost": joblib.load('xgboost_model.
|
| 14 |
-
"AdaBoost": joblib.load('adaboost_model.
|
| 15 |
}
|
| 16 |
|
| 17 |
def predict_risk(model_name, gender, age, social_category, domicile_type, first_gen,
|
|
|
|
| 6 |
|
| 7 |
# Load all trained models
|
| 8 |
models = {
|
| 9 |
+
"Logistic Regression": joblib.load('logistic_regression_model.joblib'),
|
| 10 |
+
"Random Forest": joblib.load('random_forest_model.joblib'),
|
| 11 |
+
"Support Vector Machine (SVM)": joblib.load('svm_model.joblib'),
|
| 12 |
+
"Decision Tree": joblib.load('decision_tree_model.joblib'),
|
| 13 |
+
"XGBoost": joblib.load('xgboost_model.joblib'),
|
| 14 |
+
"AdaBoost": joblib.load('adaboost_model.joblib')
|
| 15 |
}
|
| 16 |
|
| 17 |
def predict_risk(model_name, gender, age, social_category, domicile_type, first_gen,
|