norsu commited on
Commit
637056d
·
1 Parent(s): d82a45e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -1,6 +1,5 @@
1
  import streamlit as st
2
  import pickle as pk
3
- import sklearn
4
  from sklearn.linear_model import LinearRegression
5
  import numpy as np
6
  import pandas as pd
@@ -11,9 +10,9 @@ st.title("Life Expectancy Predictor")
11
 
12
  Birth_Rate = st.text_input("Birth Rate")
13
  Fertility_Rate = st.text_input("Fertility Rate")
14
- Infant_mortality = st.text_input("Infant mortality")
15
- Maternal_mortality_ratio = st.text_input("Maternal mortality ratio")
16
- Physicians_per_thousand = st.text_input("Physicians per thousand")
17
 
18
 
19
  k = st.button("Predict")
@@ -24,4 +23,3 @@ if k:
24
  x.columns = ["Birth Rate","Fertility Rate","Infant mortality","Maternal mortality ratio","Physicians per thousand"]
25
  prediction = model.predict(x)
26
  st.markdown(np.round(prediction[0],2))
27
-
 
1
  import streamlit as st
2
  import pickle as pk
 
3
  from sklearn.linear_model import LinearRegression
4
  import numpy as np
5
  import pandas as pd
 
10
 
11
  Birth_Rate = st.text_input("Birth Rate")
12
  Fertility_Rate = st.text_input("Fertility Rate")
13
+ Infant_mortality = st.text_input("Infant mortality per 1000 births")
14
+ Maternal_mortality_ratio = st.text_input("Maternal mortality ratio per 1000 births")
15
+ Physicians_per_thousand = st.text_input("Physicians per 1000")
16
 
17
 
18
  k = st.button("Predict")
 
23
  x.columns = ["Birth Rate","Fertility Rate","Infant mortality","Maternal mortality ratio","Physicians per thousand"]
24
  prediction = model.predict(x)
25
  st.markdown(np.round(prediction[0],2))