Spaces:
Sleeping
Sleeping
Delete pro.py
Browse files
pro.py
DELETED
@@ -1,26 +0,0 @@
|
|
1 |
-
import streamlit as st
|
2 |
-
import pickle as pk
|
3 |
-
from sklearn.tree import DecisionTreeRegressor
|
4 |
-
import numpy as np
|
5 |
-
import pandas as pd
|
6 |
-
|
7 |
-
model = pk.load(open(r"abc.pickle", "rb"))
|
8 |
-
|
9 |
-
st.title("Life Expectancy Predictor")
|
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")
|
14 |
-
Maternal_mortality_ratio = st.text_input("Maternal mortality ratio")
|
15 |
-
Physicians_per_thousand = st.text_input("Physicians per thousand")
|
16 |
-
|
17 |
-
|
18 |
-
k = st.button("Predict")
|
19 |
-
|
20 |
-
|
21 |
-
if k:
|
22 |
-
x = pd.DataFrame([[Birth_Rate,Fertility_Rate,Infant_mortality,Maternal_mortality_ratio,Physicians_per_thousand]])
|
23 |
-
x.columns = ["Birth Rate","Fertility Rate","Infant mortality","Maternal mortality ratio","Physicians per thousand"]
|
24 |
-
prediction = model.predict(x)
|
25 |
-
st.markdown(prediction)
|
26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|