Beladiaamy commited on
Commit
b825e19
·
verified ·
1 Parent(s): f856ca1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -65,11 +65,11 @@ def map_DiffWalk(value):
65
  mapping = {'No': 0, 'Yes': 1}
66
  return mapping[value]
67
 
68
- def map_gender(value):
69
  mapping = {'Female': 0, 'Male': 1}
70
  return mapping[value]
71
 
72
- def map_education(value):
73
  mapping = {
74
  "Never attended school": 0,
75
  "Grades 1-8": 1,
@@ -80,7 +80,7 @@ def map_education(value):
80
  }
81
  return mapping[value]
82
 
83
- def map_income(value):
84
  mapping = {
85
  "< $10,000": 0,
86
  "$10,000 - $24,999": 1,
@@ -110,10 +110,10 @@ def main_func(HighBP, HighChol, CholCheck, BMI, Smoker, Stroke, HeartDiseaseorAt
110
  'MentHlth': MentHlth,
111
  'PhysHlth': PhysHlth,
112
  'DiffWalk': map_DiffWalk(DiffWalk),
113
- 'Sex': map_gender(Sex),
114
  'Age': Age,
115
- 'Education': map_education(Education),
116
- 'Income': map_income(Income)
117
  }, orient='index').transpose()
118
 
119
 
 
65
  mapping = {'No': 0, 'Yes': 1}
66
  return mapping[value]
67
 
68
+ def map_Sex(value):
69
  mapping = {'Female': 0, 'Male': 1}
70
  return mapping[value]
71
 
72
+ def map_Education(value):
73
  mapping = {
74
  "Never attended school": 0,
75
  "Grades 1-8": 1,
 
80
  }
81
  return mapping[value]
82
 
83
+ def map_Income(value):
84
  mapping = {
85
  "< $10,000": 0,
86
  "$10,000 - $24,999": 1,
 
110
  'MentHlth': MentHlth,
111
  'PhysHlth': PhysHlth,
112
  'DiffWalk': map_DiffWalk(DiffWalk),
113
+ 'Sex': map_Sex(Sex),
114
  'Age': Age,
115
+ 'Education': map_Education(Education),
116
+ 'Income': map_Income(Income)
117
  }, orient='index').transpose()
118
 
119