Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,7 +9,6 @@ def predict_loan_status(
|
|
| 9 |
married,
|
| 10 |
dependents,
|
| 11 |
education,
|
| 12 |
-
self_employed,
|
| 13 |
applicant_income,
|
| 14 |
coapplicant_income,
|
| 15 |
loan_amount,
|
|
@@ -27,7 +26,6 @@ def predict_loan_status(
|
|
| 27 |
# Encoding categorical variables (must match training logic)
|
| 28 |
married = 1 if married == "Yes" else 0
|
| 29 |
education = 1 if education == "Graduate" else 0
|
| 30 |
-
self_employed = 1 if self_employed == "Yes" else 0
|
| 31 |
|
| 32 |
property_area_map = {
|
| 33 |
"Urban": 2,
|
|
@@ -41,7 +39,6 @@ def predict_loan_status(
|
|
| 41 |
married,
|
| 42 |
dependents,
|
| 43 |
education,
|
| 44 |
-
self_employed,
|
| 45 |
applicant_income,
|
| 46 |
coapplicant_income,
|
| 47 |
loan_amount,
|
|
@@ -63,7 +60,6 @@ interface = gr.Interface(
|
|
| 63 |
gr.Radio(["Yes", "No"], label="Married"),
|
| 64 |
gr.Number(label="Number of Dependents"),
|
| 65 |
gr.Radio(["Graduate", "Not Graduate"], label="Education"),
|
| 66 |
-
gr.Radio(["Yes", "No"], label="Self Employed"),
|
| 67 |
gr.Number(label="Applicant Income"),
|
| 68 |
gr.Number(label="Coapplicant Income"),
|
| 69 |
gr.Number(label="Loan Amount"),
|
|
|
|
| 9 |
married,
|
| 10 |
dependents,
|
| 11 |
education,
|
|
|
|
| 12 |
applicant_income,
|
| 13 |
coapplicant_income,
|
| 14 |
loan_amount,
|
|
|
|
| 26 |
# Encoding categorical variables (must match training logic)
|
| 27 |
married = 1 if married == "Yes" else 0
|
| 28 |
education = 1 if education == "Graduate" else 0
|
|
|
|
| 29 |
|
| 30 |
property_area_map = {
|
| 31 |
"Urban": 2,
|
|
|
|
| 39 |
married,
|
| 40 |
dependents,
|
| 41 |
education,
|
|
|
|
| 42 |
applicant_income,
|
| 43 |
coapplicant_income,
|
| 44 |
loan_amount,
|
|
|
|
| 60 |
gr.Radio(["Yes", "No"], label="Married"),
|
| 61 |
gr.Number(label="Number of Dependents"),
|
| 62 |
gr.Radio(["Graduate", "Not Graduate"], label="Education"),
|
|
|
|
| 63 |
gr.Number(label="Applicant Income"),
|
| 64 |
gr.Number(label="Coapplicant Income"),
|
| 65 |
gr.Number(label="Loan Amount"),
|