Update app.py
Browse files
app.py
CHANGED
@@ -44,9 +44,9 @@ with gr.Blocks(title=title) as demo:
|
|
44 |
gr.Markdown("""---""")
|
45 |
gr.Markdown(description2)
|
46 |
gr.Markdown("""---""")
|
47 |
-
|
48 |
-
input_block
|
49 |
-
output_block
|
50 |
|
51 |
with input_block():
|
52 |
with gr.Column():
|
@@ -73,10 +73,16 @@ with input_block():
|
|
73 |
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")
|
74 |
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")
|
75 |
|
76 |
-
with
|
77 |
-
|
78 |
-
|
|
|
|
|
79 |
|
|
|
|
|
|
|
|
|
80 |
submit_btn = gr.Button("Analyze")
|
81 |
|
82 |
with gr.Column(visible=True) as output_col:
|
|
|
44 |
gr.Markdown("""---""")
|
45 |
gr.Markdown(description2)
|
46 |
gr.Markdown("""---""")
|
47 |
+
|
48 |
+
input_block = gr.Row()
|
49 |
+
output_block = gr.Column()
|
50 |
|
51 |
with input_block():
|
52 |
with gr.Column():
|
|
|
73 |
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")
|
74 |
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")
|
75 |
|
76 |
+
with input_block:
|
77 |
+
input_block_left = gr.Column(HighBP, HighChol, CholCheck, BMI, Smoker, Stroke, HeartDiseaseorAttack, PhysActivity, Fruits, Veggies,
|
78 |
+
HvyAlcoholConsump, AnyHealthcare, NoDocbcCost)
|
79 |
+
input_block_right = gr.Column(GenHlth, MentHlth, PhysHlth, DiffWalk, Sex, Age, Education, Income)
|
80 |
+
input_block = gr.Row([input_block_left, input_block_right])
|
81 |
|
82 |
+
with output_block:
|
83 |
+
output_block.append(label)
|
84 |
+
output_block.append(local_plot)
|
85 |
+
|
86 |
submit_btn = gr.Button("Analyze")
|
87 |
|
88 |
with gr.Column(visible=True) as output_col:
|