Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -23,18 +23,18 @@ def predict_loan(gender, married, dependents, education, self_employed,
|
|
| 23 |
demo = gr.Interface(
|
| 24 |
fn=predict_loan,
|
| 25 |
inputs=[
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
],
|
| 39 |
outputs="text",
|
| 40 |
title="🏦 Loan Approval Predictor Final"
|
|
|
|
| 23 |
demo = gr.Interface(
|
| 24 |
fn=predict_loan,
|
| 25 |
inputs=[
|
| 26 |
+
# The FIRST item is what the user sees, the SECOND is the number the model gets
|
| 27 |
+
gr.Dropdown(choices=[("Male", 1), ("Female", 0)], label="Gender"),
|
| 28 |
+
gr.Dropdown(choices=[("Yes", 1), ("No", 0)], label="Married"),
|
| 29 |
+
gr.Dropdown(choices=[("0", 0), ("1", 1), ("2", 2), ("3+", 3)], label="Dependents"),
|
| 30 |
+
gr.Dropdown(choices=[("Graduate", 0), ("Not Graduate", 1)], label="Education"),
|
| 31 |
+
gr.Dropdown(choices=[("Yes", 1), ("No", 0)], label="Self Employed"),
|
| 32 |
+
gr.Number(label="Applicant Income"),
|
| 33 |
+
gr.Number(label="Co-applicant Income"),
|
| 34 |
+
gr.Number(label="Loan Amount"),
|
| 35 |
+
gr.Number(label="Term"),
|
| 36 |
+
gr.Dropdown(choices=[("Good", 1), ("Bad", 0)], label="Credit History"),
|
| 37 |
+
gr.Dropdown(choices=[("Rural", 0), ("Semiurban", 1), ("Urban", 2)], label="Property Area")
|
| 38 |
],
|
| 39 |
outputs="text",
|
| 40 |
title="🏦 Loan Approval Predictor Final"
|