Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -32,16 +32,14 @@ def predict_salary(age, education_num, sex, capital_gain, capital_loss, hours_pe
|
|
| 32 |
|
| 33 |
return label, confidence, fig
|
| 34 |
|
| 35 |
-
|
| 36 |
-
dark_css = """
|
| 37 |
body { background-color: #0a0a23; color: white; }
|
| 38 |
.gr-box { background-color: #1a1a3d !important; border-radius: 12px; padding: 20px; }
|
| 39 |
h1, h3, p { color: white; text-align: center; font-family: 'Segoe UI', sans-serif; }
|
| 40 |
.gr-button { background-color: #1db954 !important; color: white !important; border-radius: 10px; font-size: 1.1em; }
|
| 41 |
.gr-radio .gr-form { display: flex; justify-content: center !important; }
|
| 42 |
"""
|
| 43 |
-
|
| 44 |
-
with gr.Blocks(css=dark_css) as demo:
|
| 45 |
|
| 46 |
gr.Markdown("""
|
| 47 |
<div style='max-width: 700px; margin: 0 auto;'>
|
|
@@ -58,7 +56,7 @@ with gr.Blocks(css=dark_css) as demo:
|
|
| 58 |
gr.Markdown("<h3>๐ Education Level</h3>")
|
| 59 |
education = gr.Dropdown(choices=[str(i) for i in range(1, 17)], value="10", label="", interactive=True)
|
| 60 |
|
| 61 |
-
gr.Markdown("<h3
|
| 62 |
sex = gr.Radio(choices=["Male", "Female"], value="Male", label="", interactive=True)
|
| 63 |
|
| 64 |
gr.Markdown("<h3>๐ Capital Gain</h3>")
|
|
@@ -67,7 +65,7 @@ with gr.Blocks(css=dark_css) as demo:
|
|
| 67 |
gr.Markdown("<h3>๐ Capital Loss</h3>")
|
| 68 |
capital_loss = gr.Number(value=0, label="", interactive=True)
|
| 69 |
|
| 70 |
-
gr.Markdown("<h3
|
| 71 |
hours_per_week = gr.Number(value=40, label="", interactive=True)
|
| 72 |
|
| 73 |
predict_btn = gr.Button("๐ฎ Predict", elem_id="predict-button")
|
|
|
|
| 32 |
|
| 33 |
return label, confidence, fig
|
| 34 |
|
| 35 |
+
with gr.Blocks(css="""
|
|
|
|
| 36 |
body { background-color: #0a0a23; color: white; }
|
| 37 |
.gr-box { background-color: #1a1a3d !important; border-radius: 12px; padding: 20px; }
|
| 38 |
h1, h3, p { color: white; text-align: center; font-family: 'Segoe UI', sans-serif; }
|
| 39 |
.gr-button { background-color: #1db954 !important; color: white !important; border-radius: 10px; font-size: 1.1em; }
|
| 40 |
.gr-radio .gr-form { display: flex; justify-content: center !important; }
|
| 41 |
"""
|
| 42 |
+
) as demo:
|
|
|
|
| 43 |
|
| 44 |
gr.Markdown("""
|
| 45 |
<div style='max-width: 700px; margin: 0 auto;'>
|
|
|
|
| 56 |
gr.Markdown("<h3>๐ Education Level</h3>")
|
| 57 |
education = gr.Dropdown(choices=[str(i) for i in range(1, 17)], value="10", label="", interactive=True)
|
| 58 |
|
| 59 |
+
gr.Markdown("<h3>โง๏ธ Sex</h3>")
|
| 60 |
sex = gr.Radio(choices=["Male", "Female"], value="Male", label="", interactive=True)
|
| 61 |
|
| 62 |
gr.Markdown("<h3>๐ Capital Gain</h3>")
|
|
|
|
| 65 |
gr.Markdown("<h3>๐ Capital Loss</h3>")
|
| 66 |
capital_loss = gr.Number(value=0, label="", interactive=True)
|
| 67 |
|
| 68 |
+
gr.Markdown("<h3>โฑ๏ธ Hours per Week</h3>")
|
| 69 |
hours_per_week = gr.Number(value=40, label="", interactive=True)
|
| 70 |
|
| 71 |
predict_btn = gr.Button("๐ฎ Predict", elem_id="predict-button")
|