A personal data science portfolio built with FastAPI. Instead of static project write-ups, it includes live, interactive demos you can run in the browser.
Live ML demo: Lead Scorer on Hugging Face Spaces
- 🏠 Home and project showcase pages (Jinja2 templates)
- 🧪 Live Lab (
/lab): SQL playground, customer segmentation (RFM and K-Means), lead scoring and a movie recommender, all running in the browser with nothing to install - 🎯 Lead Scorer (
/projects/lead-scorer): a Gradient Boosting model served from Hugging Face Spaces and embedded in the site - 🔌 API endpoints for server-side features such as outreach email drafting
- 📊 Auto-generated interactive API docs via Swagger UI (
/docs) - 🎨 Responsive dark UI with a custom design system
- ⚡ Fast, async-ready backend
- Backend: FastAPI, Uvicorn
- Templating: Jinja2
- ML: scikit-learn (Gradient Boosting lead scorer), served on Hugging Face Spaces with Gradio
- Frontend: HTML, CSS, vanilla JavaScript
portfolio/
├── main.py # FastAPI app entry point
├── README.md
├── requirements.txt
├── .gitignore
├── routers/
│ ├── __init__.py
│ ├── pages.py # Page routes, profile data, PROJECTS list
│ └── api.py # API endpoints
├── templates/
│ ├── base.html
│ ├── index.html
│ ├── projects.html # Project cards, built from PROJECTS in pages.py
│ ├── lab.html # Live Lab (SQL, segmentation, lead scoring, movies)
│ └── lead_scorer.html # Lead Scorer page embedding the Hugging Face demo
└── static/
├── main.js
├── style.css
├── css/ # Live Lab styles
├── js/
│ ├── project-links.js # Links project cards to their live demos
│ └── lab-*.js # Live Lab demo scripts
├── data/ # Datasets used by the Live Lab demos
└── images/
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt
uvicorn main:app --reloadVisit http://127.0.0.1:8000 for the site, /lab for the Live Lab, or /docs for the interactive API playground.
- Add an entry to the
PROJECTSlist inrouters/pages.py. - To link its card to a live demo, add a matching entry to the
DEMOSlist instatic/js/project-links.js.
- Secrets such as API keys belong in a
.envfile, which is git-ignored. Never commit them. - The Lead Scorer model is trained on rule-generated labels and designed to be retrained with real outcome feedback.