Gaurav069 commited on
Commit
6004847
·
verified ·
1 Parent(s): 5773c12

Delete app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -34
app.py DELETED
@@ -1,34 +0,0 @@
1
- import streamlit as st
2
- import joblib
3
- import numpy as np
4
- # from PIL import Image
5
-
6
-
7
- st.image("logo.png",width = 150)
8
- st.write("# Acko Health Insurance Predictor App")
9
-
10
- Age = st.number_input("Enter your Age",min_value = 10,max_value = 90,value = 30,step = 1)
11
- Height = st.number_input("Enter your Height in Meters",min_value = 0.6,max_value = 2.7,value = 1.67)
12
- Weight = st.number_input("Enter your Weight in kilogram",min_value = 25,max_value = 200,value = 80)
13
- Children = st.number_input("Enter No. of Children",min_value = 0,max_value = 10,value = 0,step = 1)
14
-
15
- Sex = st.selectbox("Enter your Gender",("Male","Female"))
16
-
17
- Smoker = st.selectbox("Do you Smoke?",("Yes","No"))
18
- if Smoker == "Yes":
19
- st.write("\u26A0 Smoking is injurious to health! \u26A0")
20
-
21
- BMI = Weight/Height**2
22
- Smoker_num = 0 if Smoker == "No" else 1
23
- test_data = [[Age,BMI,Children,Smoker_num]]
24
-
25
- # Model Load
26
- model = joblib.load("insurance_joblib")
27
- poly = joblib.load("poly_obj")
28
-
29
- if st.button("Get Quote"):
30
-
31
- test_poly = poly.transform(test_data)
32
- y_pred_log = model.predict(test_poly)
33
- premium = round(np.exp(y_pred_log)[0],2)
34
- st.write(f"## **Your Premium Amount is ${premium}**")