GS123 commited on
Commit
9f1a491
·
verified ·
1 Parent(s): 58adde7

Upload 5 files

Browse files
Files changed (6) hide show
  1. .gitattributes +1 -0
  2. app.py +40 -0
  3. banner.jpg +3 -0
  4. insurance_joblib +0 -0
  5. logo.png +0 -0
  6. requirements.txt +4 -0
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ banner.jpg filter=lfs diff=lfs merge=lfs -text
app.py ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import numpy as np
2
+ import streamlit as st
3
+ import joblib
4
+
5
+ logo_url = "logo.png"
6
+ banner_path = "banner.jpg"
7
+
8
+ col1, col2= st.columns([1, 3])
9
+ with col1:
10
+ st.image(logo_url, width = 100)
11
+ with col2:
12
+ st.write("# Acko Insurance App")
13
+
14
+ st.image(banner_path)
15
+
16
+ age = st.number_input("Enter your age", step = 1)
17
+ height_ft = st.number_input("Enter feet part of your height", step = 1,value = 5)
18
+ height_inch = st.number_input("Enter inch part of your height", step = 1, value = 5)
19
+ weight_kg = st.number_input("Enter your weight in KG")
20
+ height_meter = height_ft *0.3048 + height_inch*0.0254
21
+ bmi = round(weight_kg/height_meter**2,2)
22
+ smoker = st.selectbox(
23
+ "Enter your smoking status?",
24
+ ("yes", "no"))
25
+ children = st.selectbox(
26
+ "Enter Number of children",
27
+ (0,1,2,3,4))
28
+
29
+ test_data = np.array([[age, bmi, smoker, children]])
30
+ st.write(test_data)
31
+
32
+ # load model
33
+ model = joblib.load("insurance_joblib")
34
+
35
+ # predict button
36
+ if st.button("Predict"):
37
+ y_pred = model.predict(test_data)
38
+ amount = np.round(y_pred**2,2)[0]
39
+ st.write(f"## Your Insurance Premium amount is: ${amount}")
40
+
banner.jpg ADDED

Git LFS Details

  • SHA256: 67ecfd44513eeadbe314bb42b40ee0b758f6ea1f19cc560ff4d0accd230f2a66
  • Pointer size: 132 Bytes
  • Size of remote file: 1.42 MB
insurance_joblib ADDED
Binary file (6.38 kB). View file
 
logo.png ADDED
requirements.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ numpy ==1.26.4
2
+ scikit-learn ==1.5.2
3
+ joblib ==1.4.2
4
+ streamlit ==1.39.0