Update app.py
Browse files
app.py
CHANGED
@@ -25,7 +25,7 @@ def main_func(HighBP, HighChol, CholCheck, BMI, Smoker, Stroke, HeartDiseaseorAt
|
|
25 |
'BMI':BMI, 'Smoker':Smoker,'Stroke':Stroke,'HeartDiseaseorAttack':HeartDiseaseorAttack,
|
26 |
'PhysActivity':PhysActivity,'Fruits':Fruits,'Veggies':Veggies,'HvyAlcoholConsump':HvyAlcoholConsump,
|
27 |
'AnyHealthcare':AnyHealthcare, 'NoDocbcCost':NoDocbcCost, 'GenHlth':GenHlth, 'MentHlth': MentHlth,
|
28 |
-
'PhysHlth':PhysHlth, 'DiffWalk':DiffWalk, 'Sex':Sex, 'Age':
|
29 |
orient = 'index').transpose()
|
30 |
|
31 |
prob = loaded_model.predict_proba(new_row)
|
@@ -76,9 +76,9 @@ with gr.Blocks(title=title) as demo:
|
|
76 |
DiffWalk = gr.Radio(["No", "Yes"], label = "Do you have serious difficulty walking or climbing stairs?", type = "index")
|
77 |
Sex = gr.Radio(["Male", "Female"], label = "Sex?", type = "index")
|
78 |
|
79 |
-
Age = gr.Dropdown(["18-24","25-29","30-34","35-39","40-44","45-49","50-54","55-59","60-64","65-69","70-74","75-79","80 and older"],label="Age")
|
80 |
-
Education = gr.Dropdown(["Never attended school or only kindergarten","Grades 1 through 8 (Elementary)","Grades 9 through 11 (Some high school)","Grade 12 or GED (High school graduate)","College 1 year to 3 years (Some college or technical school)","College 4 years or more (College graduated)"],label="Education Level")
|
81 |
-
Income = gr.Dropdown(["Less than $10,000","Less than $16,250","Less than $22,500","Less than $28,750","Less than $35,000","Less than $48,500","Less than $61,500","$75,000 or more"],label="Income Level")
|
82 |
|
83 |
submit_btn = gr.Button("Analyze")
|
84 |
|
|
|
25 |
'BMI':BMI, 'Smoker':Smoker,'Stroke':Stroke,'HeartDiseaseorAttack':HeartDiseaseorAttack,
|
26 |
'PhysActivity':PhysActivity,'Fruits':Fruits,'Veggies':Veggies,'HvyAlcoholConsump':HvyAlcoholConsump,
|
27 |
'AnyHealthcare':AnyHealthcare, 'NoDocbcCost':NoDocbcCost, 'GenHlth':GenHlth, 'MentHlth': MentHlth,
|
28 |
+
'PhysHlth':PhysHlth, 'DiffWalk':DiffWalk, 'Sex':Sex, 'Age':Age, 'Education':Education, 'Income':Income},
|
29 |
orient = 'index').transpose()
|
30 |
|
31 |
prob = loaded_model.predict_proba(new_row)
|
|
|
76 |
DiffWalk = gr.Radio(["No", "Yes"], label = "Do you have serious difficulty walking or climbing stairs?", type = "index")
|
77 |
Sex = gr.Radio(["Male", "Female"], label = "Sex?", type = "index")
|
78 |
|
79 |
+
Age = gr.Dropdown(["18-24","25-29","30-34","35-39","40-44","45-49","50-54","55-59","60-64","65-69","70-74","75-79","80 and older"],label="Age", type = "index")
|
80 |
+
Education = gr.Dropdown(["Never attended school or only kindergarten","Grades 1 through 8 (Elementary)","Grades 9 through 11 (Some high school)","Grade 12 or GED (High school graduate)","College 1 year to 3 years (Some college or technical school)","College 4 years or more (College graduated)"],label="Education Level", type = "index")
|
81 |
+
Income = gr.Dropdown(["Less than $10,000","Less than $16,250","Less than $22,500","Less than $28,750","Less than $35,000","Less than $48,500","Less than $61,500","$75,000 or more"],label="Income Level", type = "index")
|
82 |
|
83 |
submit_btn = gr.Button("Analyze")
|
84 |
|