How sevastyanovilya/credit_scoring works
Project type and purpose
• This is a lightweight full-stack ML scoring service.
• Purpose: train a predictive model on historical data (train.py → model.pkl), serve real-time scoring via an HTTP API (service.py), and provide an interactive front-end using Streamlit (app.py).
File structure
• Top level:
• README.md – project overview and launch instructions
• requirements.txt – runtime dependencies (FastAPI/uvicorn, Streamlit, pandas, scikit-learn, etc.)
• train.py – data ingestion (data/scoring.csv) → model training → model.pkl
• service.py – FastAPI application exposing a /score endpoint, loads model.pkl
• app.py – Streamlit front-end that calls the service’s API
• data/scoring.csv – raw training data
• model.pkl – serialized trained model
• Patterns:
• Separation of concerns: data & training vs. scoring service vs. user interface
• Simple two-tier architecture (frontend ↔ backend) plus offline training component
README for additional insights
• The README confirms:
• How to install dependencies
• How to launch the API (uvicorn service:app)
• How to launch the UI (streamlit run app.py)
Elements
• Clear labels:
• Data Store, Training, API Service, Front-End UI, End User
• Rectangles for components (blue = data & training, green = service, orange = UI)
Putting it all together
• Layout recommendation:
• Use consistent iconography: