sihar commited on
Commit
e5241ed
1 Parent(s): 274a37b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -1,7 +1,8 @@
1
  import streamlit as st
2
  import pandas as pd
3
-
4
-
 
5
  #title
6
  st.title("Predict Death Event")
7
  st.write("Created by Sihar Pangaribuan")
@@ -35,7 +36,7 @@ data = pd.DataFrame({'age': [age],
35
  'time': [time]})
36
 
37
  # model predict
38
- death = rf_randomCV.predict(data).tolist()[0]
39
 
40
  # interpretation
41
  st.write('Predition Result: ')
 
1
  import streamlit as st
2
  import pandas as pd
3
+ import pickle
4
+ # import model
5
+ model = pickle.load(open("model.pkl", "rb"))
6
  #title
7
  st.title("Predict Death Event")
8
  st.write("Created by Sihar Pangaribuan")
 
36
  'time': [time]})
37
 
38
  # model predict
39
+ death = model.predict(data).tolist()[0]
40
 
41
  # interpretation
42
  st.write('Predition Result: ')