Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -83,32 +83,32 @@ with gr.Blocks(title=title) as demo:
|
|
| 83 |
gr.Image("house.png.jpg")
|
| 84 |
|
| 85 |
with gr.Row():
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
|
| 113 |
|
| 114 |
submit_btn = gr.Button("Predict Income")
|
|
|
|
| 83 |
gr.Image("house.png.jpg")
|
| 84 |
|
| 85 |
with gr.Row():
|
| 86 |
+
with gr.Column():
|
| 87 |
+
age = gr.Number(label="Age", value=35)
|
| 88 |
+
sex = gr.Radio(choices=["Male", "Female"], label="Sex", value="Female")
|
| 89 |
+
hours_per_week = gr.Number(label="Hours per Week", value=40)
|
| 90 |
+
|
| 91 |
+
with gr.Column():
|
| 92 |
+
education = gr.Dropdown(
|
| 93 |
+
choices=["Bachelors", "Masters", "HS-grad", "Some-college", "Doctorate"],
|
| 94 |
+
label="Education",
|
| 95 |
+
value="Bachelors"
|
| 96 |
+
)
|
| 97 |
+
workclass = gr.Dropdown(
|
| 98 |
+
choices=["Private", "Self-emp-not-inc", "State-gov", "Local-gov", "Never-worked", "Without-pay"],
|
| 99 |
+
label="Workclass",
|
| 100 |
+
value="Private"
|
| 101 |
+
)
|
| 102 |
+
marital_status = gr.Dropdown(
|
| 103 |
+
choices=["Never-married", "Married-civ-spouse", "Divorced", "Separated", "Widowed", "Married-AF-spouse", "Married-spouse-absent"],
|
| 104 |
+
label="Marital Status",
|
| 105 |
+
value="Never-married"
|
| 106 |
+
)
|
| 107 |
+
race = gr.Dropdown(
|
| 108 |
+
choices=["White", "Black", "Asian-Pac-Islander", "Other"],
|
| 109 |
+
label="Race",
|
| 110 |
+
value="White"
|
| 111 |
+
)
|
| 112 |
|
| 113 |
|
| 114 |
submit_btn = gr.Button("Predict Income")
|