viwiyada commited on
Commit
ba274e9
1 Parent(s): 6b64b4b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -14
app.py CHANGED
@@ -34,23 +34,23 @@ def main():
34
  not_fully_paid = st.slider("not fully paid.", 0,100)
35
 
36
  # clicked==True only when the button is clicked
37
- clicked = st.form_submit_button("Predict income")
38
  if clicked:
39
- result=model.predict(pd.DataFrame({"purpose": [purpose_1],
40
- "int.rate": [int_rate],
41
- "installment": [installments],
42
- "log.annual.inc": [log_annual_inc],
43
- "dti": [dti],
44
- "fico": [fico],
45
- "days.with.cr.line": [days_with_cr_line],
46
- "revol.bal": [revol_bal],
47
- "revol.util": [revol_util],
48
- "inq.last.6mths": [inq_last_6mths],
49
  "delinq.2yrs":[delinq_2yrs],
50
- "pub.rec": [pub_rec],
51
- "not.fully.paid": [not_fully_paid]}))
52
  # Show prediction
53
- result = 'Pass' if result[1] == 0 else 'Not Pass'
54
  st.success("Your predicted loan is "+result) #แสดงผล
55
 
56
  # Run main()
 
34
  not_fully_paid = st.slider("not fully paid.", 0,100)
35
 
36
  # clicked==True only when the button is clicked
37
+ clicked = st.form_submit_button("Predict loan")
38
  if clicked:
39
+ result=model.predict(pd.DataFrame({"purpose":[purpose_1],
40
+ "int.rate":[int_rate],
41
+ "installment":[installments],
42
+ "log.annual.inc":[log_annual_inc],
43
+ "dti":[dti],
44
+ "fico":[fico],
45
+ "days.with.cr.line":[days_with_cr_line],
46
+ "revol.bal":[revol_bal],
47
+ "revol.util":[revol_util],
48
+ "inq.last.6mths":[inq_last_6mths],
49
  "delinq.2yrs":[delinq_2yrs],
50
+ "pub.rec":[pub_rec],
51
+ "not.fully.paid":[not_fully_paid]}))
52
  # Show prediction
53
+ result = 'Pass' if result[0] == 0 else 'Not Pass'
54
  st.success("Your predicted loan is "+result) #แสดงผล
55
 
56
  # Run main()