Update app.py
Browse files
app.py
CHANGED
@@ -96,17 +96,14 @@ if st.button("Predict"):
|
|
96 |
Oldpeak=oldpeak,
|
97 |
ST_Slope=st_slope
|
98 |
)
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
prediction = response.json()["prediction"]
|
106 |
-
result = "Positive for heart disease" if prediction == 1 else "Negative for heart disease"
|
107 |
-
st.success(f"Prediction: {result}")
|
108 |
else:
|
109 |
-
st.
|
110 |
|
111 |
|
112 |
st.subheader("Batch Prediction")
|
|
|
96 |
Oldpeak=oldpeak,
|
97 |
ST_Slope=st_slope
|
98 |
)
|
99 |
+
|
100 |
+
result = predict(data)
|
101 |
+
|
102 |
+
st.write("### Prediction:")
|
103 |
+
if result == 1:
|
104 |
+
st.write("The model predicts a high risk of heart disease.")
|
|
|
|
|
|
|
105 |
else:
|
106 |
+
st.write("The model predicts a low risk of heart disease.")
|
107 |
|
108 |
|
109 |
st.subheader("Batch Prediction")
|