Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -6,6 +6,7 @@ from catboost import CatBoostClassifier
|
|
6 |
|
7 |
clf = CatBoostClassifier()
|
8 |
clf.load_model("./loan-model.bin")
|
|
|
9 |
def predict(customerid: 0,
|
10 |
gender: 'Female',
|
11 |
married: 'No',
|
@@ -19,9 +20,11 @@ def predict(customerid: 0,
|
|
19 |
credit_history: 0,
|
20 |
property_area: 'Rural'
|
21 |
)
|
|
|
22 |
prediction_array = np.array([customerid, gender, married, dependents, education, self_employed, applicantincome, coapplicantincome, loanamount, loan_amount_term, credit_history, property_area])
|
23 |
verdict = clf.predict(prediction_array)
|
24 |
if verdict >= 0.5:
|
|
|
25 |
print('Good Standing - Approved: "Applicant stand a higher chance paying back loan"')
|
26 |
else:
|
27 |
print('Bad Standing - Rejected: "Applicant stand a higher chance defaulting payment"')
|
|
|
6 |
|
7 |
clf = CatBoostClassifier()
|
8 |
clf.load_model("./loan-model.bin")
|
9 |
+
|
10 |
def predict(customerid: 0,
|
11 |
gender: 'Female',
|
12 |
married: 'No',
|
|
|
20 |
credit_history: 0,
|
21 |
property_area: 'Rural'
|
22 |
)
|
23 |
+
|
24 |
prediction_array = np.array([customerid, gender, married, dependents, education, self_employed, applicantincome, coapplicantincome, loanamount, loan_amount_term, credit_history, property_area])
|
25 |
verdict = clf.predict(prediction_array)
|
26 |
if verdict >= 0.5:
|
27 |
+
|
28 |
print('Good Standing - Approved: "Applicant stand a higher chance paying back loan"')
|
29 |
else:
|
30 |
print('Bad Standing - Rejected: "Applicant stand a higher chance defaulting payment"')
|