Upload prediction.py
Browse files- prediction.py +6 -2
prediction.py
CHANGED
@@ -28,7 +28,7 @@ def run():
|
|
28 |
|
29 |
|
30 |
|
31 |
-
submitted = st.form_submit_button('
|
32 |
|
33 |
df_inf = {
|
34 |
'age': age,
|
@@ -58,7 +58,11 @@ def run():
|
|
58 |
if submitted:
|
59 |
# Predict using RandomForest
|
60 |
y_pred_inf = rf_gridcv_best.predict(df_inf_final)
|
61 |
-
st.write('#
|
|
|
|
|
|
|
|
|
62 |
|
63 |
if __name__ == '__main__':
|
64 |
run()
|
|
|
28 |
|
29 |
|
30 |
|
31 |
+
submitted = st.form_submit_button('Is the patient still alive?')
|
32 |
|
33 |
df_inf = {
|
34 |
'age': age,
|
|
|
58 |
if submitted:
|
59 |
# Predict using RandomForest
|
60 |
y_pred_inf = rf_gridcv_best.predict(df_inf_final)
|
61 |
+
st.write('# Is the patient still alive ?')
|
62 |
+
if y_pred_inf == 0:
|
63 |
+
st.subheader('Still Alive (^o^)/ ')
|
64 |
+
else:
|
65 |
+
st.subheader('Died from heart failure (T_T)')
|
66 |
|
67 |
if __name__ == '__main__':
|
68 |
run()
|