lilsha commited on
Commit
ce9644d
1 Parent(s): fbdcf36

Upload 4 files

Browse files
Files changed (3) hide show
  1. app.py +5 -8
  2. model.joblib +2 -2
  3. unique_values.joblib +2 -2
app.py CHANGED
@@ -9,9 +9,6 @@ unique_values = joblib.load('unique_values.joblib')
9
 
10
  unique_hypertension = unique_values["hypertension"]
11
  unique_heart_disease = unique_values["heart_disease"]
12
- unique_bmi = unique_values["bmi"]
13
- unique_HbA1c_level = unique_values["HbA1c_level"]
14
- unique_blood_glucose_level = unique_values["blood_glucose_level"]
15
  unique_gender = unique_values["gender"]
16
  unique_smoking_history = unique_values["smoking_history"]
17
 
@@ -22,9 +19,9 @@ def main():
22
  age = st.slider("Age", min_value=10, max_value=100)
23
  hypertension = st.selectbox("Hypertemsion", unique_hypertension)
24
  heart_disease = st.selectbox("Heart_desease", unique_heart_disease)
25
- bmi = st.selectbox("Bmi", unique_bmi)
26
- HbA1c_level = st.selectbox("HbA1c_level", unique_HbA1c_level)
27
- blood_glucose_level = st.selectbox("Blood_glucose_level", blood_glucose_level)
28
  gender = st.selectbox("Gender", gender)
29
  smoking_history = st.selectbox("Smoking_history", smoking_history)
30
 
@@ -39,8 +36,8 @@ def main():
39
  "blood_glucose_level": [blood_glucose_level],
40
  "gender": [gender],
41
  "smoking_history": [smoking_history]}))
42
- result = '0' if result[0] == 1 else '1'
43
- st.success('The predicted income is {}'.format(result))
44
 
45
  if __name__=='__main__':
46
  main()
 
9
 
10
  unique_hypertension = unique_values["hypertension"]
11
  unique_heart_disease = unique_values["heart_disease"]
 
 
 
12
  unique_gender = unique_values["gender"]
13
  unique_smoking_history = unique_values["smoking_history"]
14
 
 
19
  age = st.slider("Age", min_value=10, max_value=100)
20
  hypertension = st.selectbox("Hypertemsion", unique_hypertension)
21
  heart_disease = st.selectbox("Heart_desease", unique_heart_disease)
22
+ bmi = st.slider("Bmi", min_value=10, max_value=100)
23
+ HbA1c_level = st.slider("HbA1c_level", min_value=1, max_value=100)
24
+ blood_glucose_level = st.slider("Blood_glucose_level", min_value=1, max_value=100)
25
  gender = st.selectbox("Gender", gender)
26
  smoking_history = st.selectbox("Smoking_history", smoking_history)
27
 
 
36
  "blood_glucose_level": [blood_glucose_level],
37
  "gender": [gender],
38
  "smoking_history": [smoking_history]}))
39
+ result = 'have diabetes' if result[0] == 1 else 'does not have diabetes'
40
+ st.success('The predicted is {}'.format(result))
41
 
42
  if __name__=='__main__':
43
  main()
model.joblib CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:6862d5b4e1243fd4e1476a47dc920b543beb6d85a0e84ca390f82c84b25596ac
3
- size 78151
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e1af12b0676e6cbd30a30d8bd474aec5a36c5473b1b0e03489b4b087b197bb0d
3
+ size 78615
unique_values.joblib CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:d98e93cf5252f67209be6718307d01e7de94569ed80106950245e4261c9ad059
3
- size 796
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:91b4069c31d0fab3c12ecdfc0636940d12583e76bb015ce455e50af92285f5a8
3
+ size 1341