Spaces:
Sleeping
Sleeping
fix: rejected error status
Browse files- 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 |
-
|
|
|
|
|
|
|
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}")
|