ahmadluay commited on
Commit
034aa96
1 Parent(s): 47f9edb

Upload prediction.py

Browse files
Files changed (1) hide show
  1. prediction.py +6 -2
prediction.py CHANGED
@@ -28,7 +28,7 @@ def run():
28
 
29
 
30
 
31
- submitted = st.form_submit_button(' Still Alive or Not ?')
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('# Still Alive or Not ? (0 = Alive, 1 = Deceased) ',str(int(y_pred_inf)))
 
 
 
 
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()