Update app.py
Browse files
app.py
CHANGED
|
@@ -19,7 +19,9 @@ explainer = shap.Explainer(loaded_model) # PLEASE DO NOT CHANGE THIS.
|
|
| 19 |
new_row = pd.DataFrame.from_dict({'ID':ID,'Diabetes_binary':Diabetes_binary,
|
| 20 |
'HighBP':HighBP,'HighCol':HighCol,'CholCheck':CholCheck,
|
| 21 |
'BMI':BMI, 'Smoker':Smoker,'Stroke':Stroke,'HeartDiseaseorAttack':HeartDiseaseorAttack,
|
| 22 |
-
'PhysActivity':PhysActivity,'Fruits':Fruits,'Veggies':Veggies,'HvyAlcoholConsump':HvyAlcoholConsump,
|
|
|
|
|
|
|
| 23 |
orient = 'index').transpose()
|
| 24 |
|
| 25 |
prob = loaded_model.predict_proba(new_row)
|
|
|
|
| 19 |
new_row = pd.DataFrame.from_dict({'ID':ID,'Diabetes_binary':Diabetes_binary,
|
| 20 |
'HighBP':HighBP,'HighCol':HighCol,'CholCheck':CholCheck,
|
| 21 |
'BMI':BMI, 'Smoker':Smoker,'Stroke':Stroke,'HeartDiseaseorAttack':HeartDiseaseorAttack,
|
| 22 |
+
'PhysActivity':PhysActivity,'Fruits':Fruits,'Veggies':Veggies,'HvyAlcoholConsump':HvyAlcoholConsump,
|
| 23 |
+
'AnyHealthcare':AnyHealthcare, 'NoDocbcCost':NoDocbcCost, 'GenHlth':GenHlth, 'MenHlth': MenHlth,
|
| 24 |
+
'PhysHealth':PhysHealth, 'DiffWalk':DiffWalk, 'Sex':Sex, 'Age':Age, 'Education':Education, 'Income':Income},
|
| 25 |
orient = 'index').transpose()
|
| 26 |
|
| 27 |
prob = loaded_model.predict_proba(new_row)
|