How pypcoder/ledger works
Ledger is a Streamlit loan-approval prediction app. An applicant enters loan and personal details, chooses the ensemble or an individual model and a decision threshold, then submits an evaluation. The app preprocesses the fields and sends them to the selected inference path; it displays an approval probability and decision, with per-model probabilities for ensemble runs. A separate performance view presents saved test metrics. The source excerpts show these runtime connections; model artifacts are present in the tree, but a results-summary CSV is not.
Main entry points: app.py Streamlit application · ensemble.py Model loading and inference · config.py Feature and model settings · preprocessing.py Input preprocessing
Components 9
Applicant interface
- Streamlit application
app.py
Prediction pipeline
- Input preprocessing
preprocessing.py - Model loading and inference
ensemble.py - Monotonic MLP
models.py
Models and configuration
- Feature and model settings
config.py - Saved model artifacts
models_saved
Results and styling
- UI styling and result HTML
theme.py - Held-out performance summary
models_saved
Other components
- Applicant
Connections 10
- Applicant → Streamlit application: submits application
app.py - Streamlit application → Input preprocessing: preprocesses fields
app.py - Streamlit application → Model loading and inference: requests predictions
app.py - Model loading and inference → Monotonic MLP: uses architecture
ensemble.py - Model loading and inference → Feature and model settings: loads paths
ensemble.py - Input preprocessing → Feature and model settings: uses mappings
preprocessing.py - Model loading and inference → Saved model artifacts: loads models
ensemble.py - Model loading and inference → Held-out performance summary: reads metrics
ensemble.py - Streamlit application → Feature and model settings: uses choices
app.py - Streamlit application → UI styling and result HTML: renders interface
app.py