ifiecas commited on
Commit
663c0e0
·
verified ·
1 Parent(s): 42691c2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -2
app.py CHANGED
@@ -185,8 +185,20 @@ with tab1:
185
  dti = (loan_amount / total_income) if total_income > 0 else 0
186
  dti_percent = dti * 100
187
 
188
- # Show important metrics
189
- st.markdown(f"<p>Debt-to-Income Ratio: <strong>{dti_percent:.1f}%</strong></p>", unsafe_allow_html=True)
 
 
 
 
 
 
 
 
 
 
 
 
190
 
191
  st.markdown('</div>', unsafe_allow_html=True)
192
 
 
185
  dti = (loan_amount / total_income) if total_income > 0 else 0
186
  dti_percent = dti * 100
187
 
188
+ # Show important metrics with context
189
+ st.markdown("<p>Debt-to-Income Ratio: <strong>{:.1f}%</strong></p>".format(dti_percent), unsafe_allow_html=True)
190
+
191
+ # Add helpful context about DTI
192
+ dti_status = ""
193
+ if dti_percent <= 36:
194
+ dti_status = "📗 Good (below 36%)"
195
+ elif dti_percent <= 43:
196
+ dti_status = "📙 Acceptable (36-43%)"
197
+ else:
198
+ dti_status = "📕 High (above 43%)"
199
+
200
+ st.markdown(f"<p>DTI Status: {dti_status}</p>", unsafe_allow_html=True)
201
+ st.markdown("<p style='font-size:0.8rem;color:#666;'>A lower Debt-to-Income ratio improves your chances of loan approval. Most lenders prefer ratios below 43%.</p>", unsafe_allow_html=True)
202
 
203
  st.markdown('</div>', unsafe_allow_html=True)
204