Spaces:
Sleeping
Sleeping
Commit
·
9c1912f
1
Parent(s):
ce70cad
fix predict heart disease function
Browse files
pages/5_Heart_Disease_Prediction.py
CHANGED
|
@@ -8,9 +8,9 @@ st.set_page_config(page_title="Heart Disease Prediction", layout="wide")
|
|
| 8 |
model = joblib.load("./model-3.joblib")
|
| 9 |
|
| 10 |
# Define function to predict heart disease
|
| 11 |
-
def predict_heart_disease(sex, exang, cp_1, cp_2, cp_4, slope_1, slope_2, thal_3, thal_7):
|
| 12 |
-
print([[sex, exang, cp_1, cp_2, cp_4, slope_1, slope_2, thal_3, thal_7]])
|
| 13 |
-
prediction = model.predict([[sex, exang, cp_1, cp_2, cp_4, slope_1, slope_2, thal_3, thal_7]])
|
| 14 |
return prediction
|
| 15 |
|
| 16 |
def run():
|
|
|
|
| 8 |
model = joblib.load("./model-3.joblib")
|
| 9 |
|
| 10 |
# Define function to predict heart disease
|
| 11 |
+
def predict_heart_disease(sex, exang, cp_1, cp_2, cp_3, cp_4, restecg_1, slope_1, slope_2, thal_3, thal_6, thal_7):
|
| 12 |
+
print([[sex, exang, cp_1, cp_2, cp_3, cp_4, restecg_1, slope_1, slope_2, thal_3, thal_6, thal_7]])
|
| 13 |
+
prediction = model.predict([[sex, exang, cp_1, cp_2, cp_3, cp_4, restecg_1, slope_1, slope_2, thal_3, thal_6, thal_7]])
|
| 14 |
return prediction
|
| 15 |
|
| 16 |
def run():
|