sihar commited on
Commit
fc73154
1 Parent(s): a7655a9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -1,6 +1,8 @@
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
@@ -35,6 +37,7 @@ data = pd.DataFrame({'age': [age],
35
  'smoking': [smoking],
36
  'time': [time]})
37
 
 
38
  # model predict
39
  death = model.predict(data).tolist()[0]
40
 
 
1
  import streamlit as st
2
  import pandas as pd
3
  import pickle
4
+
5
+ preproses = pickle.load(open("preproses.pkl", "rb"))
6
  # import model
7
  model = pickle.load(open("model.pkl", "rb"))
8
  #title
 
37
  'smoking': [smoking],
38
  'time': [time]})
39
 
40
+ data = preproses.transform(data)
41
  # model predict
42
  death = model.predict(data).tolist()[0]
43