nullHawk commited on
Commit
33e04c8
·
verified ·
1 Parent(s): 8aa1066

fix: rejected error status

Browse files
Files changed (1) hide show
  1. frontend/app.py +4 -1
frontend/app.py CHANGED
@@ -20,6 +20,9 @@ if st.button("Predict"):
20
  try:
21
  response = requests.post("http://localhost:5000/prediction", json=payload)
22
  result = response.json()
23
- st.success(f"Loan Status: {result['loan_approval_status']}")
 
 
 
24
  except Exception as e:
25
  st.error(f"API Error: {e}")
 
20
  try:
21
  response = requests.post("http://localhost:5000/prediction", json=payload)
22
  result = response.json()
23
+ if result['loan_approval_status'] == "Rejected":
24
+ st.error(f"Loan Status: {result['loan_approval_status']}")
25
+ else:
26
+ st.success(f"Loan Status: {result['loan_approval_status']}")
27
  except Exception as e:
28
  st.error(f"API Error: {e}")