Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -39,11 +39,23 @@ data = pd.DataFrame({'age': [age],
|
|
39 |
|
40 |
data = preproses.transform(data)
|
41 |
# model predict
|
42 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
|
44 |
# interpretation
|
45 |
-
st.write('Predition Result: ')
|
46 |
-
if death == 0:
|
47 |
-
|
48 |
-
else:
|
49 |
-
|
|
|
39 |
|
40 |
data = preproses.transform(data)
|
41 |
# model predict
|
42 |
+
|
43 |
+
if st.button('Predict'):
|
44 |
+
prediction = model.predict(data).tolist()[0]
|
45 |
+
|
46 |
+
if prediction == 1:
|
47 |
+
prediction = 'Death'
|
48 |
+
else:
|
49 |
+
prediction = 'Live'
|
50 |
+
|
51 |
+
st.write('Based on user input, predicted: ')
|
52 |
+
|
53 |
+
|
54 |
+
|
55 |
|
56 |
# interpretation
|
57 |
+
# st.write('Predition Result: ')
|
58 |
+
# if death == 0:
|
59 |
+
# st.text('live')
|
60 |
+
# else:
|
61 |
+
# st.text('Death')
|