Beladiaamy commited on
Commit
f79c001
·
verified ·
1 Parent(s): 9afac68

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -19
app.py CHANGED
@@ -46,29 +46,29 @@ with gr.Blocks(title=title) as demo:
46
  gr.Markdown("""---""")
47
 
48
  input_block_left() = gr.Column(
49
- HighBP = gr.Radio(label="Do you have high Blood Pressure?", choices=["No", "Yes"], default="Yes", description="0 = no high BP, 1 = high BP")
50
- HighChol = gr.Radio(label="Do you have high Cholesterol?", choices=["No", "Yes"], default="Yes", description="0 = no high cholesterol, 1 = high cholesterol")
51
- CholCheck = gr.Radio(label="Did you have a Cholestorol check in past 5 years?", choices=["No", "Yes"], default="Yes", description="No = not checked in 5 years, Yes = checked in 5 years")
52
- BMI = gr.Number(label="BMI", minimum=0, maximum=98, default=1)
53
- Smoker = gr.Radio(label="Are you a smoker?", choices=["No", "Yes"], default="Yes", description="No = never smoked, Yes = smoked at least 100 cigarettes")
54
- Stroke = gr.Radio(label="Have you had a stroke?", choices=["No", "Yes"], default="Yes", description="No = never had a stroke, Yes = had a stroke")
55
- HeartDiseaseorAttack = gr.Radio(label="Do you have coronary heart disease or myocardial infarction?", choices=["No", "Yes"], default="Yes", description="No = no CHD/MI, Yes = CHD/MI")
56
- PhysActivity = gr.Radio(label="Physical Activity in the past 30 days?", choices=["No", "Yes"], default="Yes", description="No = no activity, Yes = active")
57
- Fruits = gr.Radio(label="Do you consume fruit 1 or more times per day?", choices=["No", "Yes"], default="Yes", description="No = less than daily, Yes = daily")
58
- Veggies = gr.Radio(label="Do you consume Vegetables 1 or more times per day?", choices=["No", "Yes"], default="Yes", description="No = less than daily, Yes = daily")
59
- HvyAlcoholConsump = gr.Radio(label="Do you drink often? (adult men having more than 14 drinks/week and adult women having more than 7 drinks/week)", choices=["No", "Yes"], default="Yes", description="No = not heavy drinker, Yes = heavy drinker")
60
- AnyHealthcare = gr.Radio(label="Do you have any kind of health care coverage? (e.g., health insurance, prepaid plans such as HMO)", choices=["No", "Yes"], default="Yes", description="No = no coverage, Yes = coverage")
61
  NoDocbcCost = gr.Radio(label="Was there a time in the past 12 months when you needed to see a doctor but could not because of cost?", choices=["No", "Yes"], default="Yes", description="No = no barrier, Yes = cost barrier")
62
  )
63
 
64
  input_block_right = gr.Column(
65
- GenHlth = gr.Slider(label="In general, rank your health on a scale: 1(excellent)-5(poor)", minimum=1, maximum=5, default=1, step=1, description="1 = excellent, 5 = poor")
66
- MentHlth = gr.Number(label="Poor Mental Health in the Past 30 Days", minimum=0, maximum=30, default=1, description="Days not good out of last 30")
67
- PhysHlth = gr.Number(label="Poor Physical Health in the Past 30 Days", minimum=0, maximum=30, default=1, description="Days not good out of last 30")
68
- DiffWalk = gr.Radio(label="Do you have serious difficulty walking or climbing stairs?", choices=["No", "Yes"], default="Yes", description="No = no difficulty, Yes = difficulty")
69
- Sex = gr.Radio(label="Sex", choices=["Female", "Male"], default="Male", description="Female or Male")
70
- Age = gr.Number(label="Age", minimum=1, maximum=100, default=1)
71
- Education = gr.Dropdown(label="Education Level", choices=["Never attended school", "Grades 1-8", "Grades 9-11", "Grade 12 or GED", "College 1-3 years", "College 4+ years"], default="Never attended school", description="Education level")
72
  Income = gr.Dropdown(label="Income Level", choices=["< $10,000", "$10,000 - $24,999", "$25,000 - $49,999", "$50,000 - $74,999", "$75,000 or more"], default="< $10,000", description="Income level")
73
  )
74
 
 
46
  gr.Markdown("""---""")
47
 
48
  input_block_left() = gr.Column(
49
+ HighBP = gr.Radio(label="Do you have high Blood Pressure?", choices=["No", "Yes"], default="Yes", description="0 = no high BP, 1 = high BP"),
50
+ HighChol = gr.Radio(label="Do you have high Cholesterol?", choices=["No", "Yes"], default="Yes", description="0 = no high cholesterol, 1 = high cholesterol"),
51
+ CholCheck = gr.Radio(label="Did you have a Cholestorol check in past 5 years?", choices=["No", "Yes"], default="Yes", description="No = not checked in 5 years, Yes = checked in 5 years"),
52
+ BMI = gr.Number(label="BMI", minimum=0, maximum=98, default=1),
53
+ Smoker = gr.Radio(label="Are you a smoker?", choices=["No", "Yes"], default="Yes", description="No = never smoked, Yes = smoked at least 100 cigarettes"),
54
+ Stroke = gr.Radio(label="Have you had a stroke?", choices=["No", "Yes"], default="Yes", description="No = never had a stroke, Yes = had a stroke"),
55
+ HeartDiseaseorAttack = gr.Radio(label="Do you have coronary heart disease or myocardial infarction?", choices=["No", "Yes"], default="Yes", description="No = no CHD/MI, Yes = CHD/MI"),
56
+ PhysActivity = gr.Radio(label="Physical Activity in the past 30 days?", choices=["No", "Yes"], default="Yes", description="No = no activity, Yes = active"),
57
+ Fruits = gr.Radio(label="Do you consume fruit 1 or more times per day?", choices=["No", "Yes"], default="Yes", description="No = less than daily, Yes = daily"),
58
+ Veggies = gr.Radio(label="Do you consume Vegetables 1 or more times per day?", choices=["No", "Yes"], default="Yes", description="No = less than daily, Yes = daily"),
59
+ HvyAlcoholConsump = gr.Radio(label="Do you drink often? (adult men having more than 14 drinks/week and adult women having more than 7 drinks/week)", choices=["No", "Yes"], default="Yes", description="No = not heavy drinker, Yes = heavy drinker"),
60
+ AnyHealthcare = gr.Radio(label="Do you have any kind of health care coverage? (e.g., health insurance, prepaid plans such as HMO)", choices=["No", "Yes"], default="Yes", description="No = no coverage, Yes = coverage"),
61
  NoDocbcCost = gr.Radio(label="Was there a time in the past 12 months when you needed to see a doctor but could not because of cost?", choices=["No", "Yes"], default="Yes", description="No = no barrier, Yes = cost barrier")
62
  )
63
 
64
  input_block_right = gr.Column(
65
+ GenHlth = gr.Slider(label="In general, rank your health on a scale: 1(excellent)-5(poor)", minimum=1, maximum=5, default=1, step=1, description="1 = excellent, 5 = poor"),
66
+ MentHlth = gr.Number(label="Poor Mental Health in the Past 30 Days", minimum=0, maximum=30, default=1, description="Days not good out of last 30"),
67
+ PhysHlth = gr.Number(label="Poor Physical Health in the Past 30 Days", minimum=0, maximum=30, default=1, description="Days not good out of last 30"),
68
+ DiffWalk = gr.Radio(label="Do you have serious difficulty walking or climbing stairs?", choices=["No", "Yes"], default="Yes", description="No = no difficulty, Yes = difficulty"),
69
+ Sex = gr.Radio(label="Sex", choices=["Female", "Male"], default="Male", description="Female or Male"),
70
+ Age = gr.Number(label="Age", minimum=1, maximum=100, default=1),
71
+ Education = gr.Dropdown(label="Education Level", choices=["Never attended school", "Grades 1-8", "Grades 9-11", "Grade 12 or GED", "College 1-3 years", "College 4+ years"], default="Never attended school", description="Education level"),
72
  Income = gr.Dropdown(label="Income Level", choices=["< $10,000", "$10,000 - $24,999", "$25,000 - $49,999", "$50,000 - $74,999", "$75,000 or more"], default="< $10,000", description="Income level")
73
  )
74