Hands-on Machine Learning notebooks in Python — each example is a self-contained uv project with its own environment and README.
Practical walkthroughs of classical ML workflows: load data, train a model, evaluate, and experiment. Topics include text classification, face detection, generative modeling, and digit recognition.
Each example lives in its own root-level folder. Folder names follow algorithm + task (e.g. naive-bayes-text-classification, hog-svm-face-detection).
Every project is a uv environment: cd into the folder and run uv sync, then open the notebook with that project’s kernel.
.env)Copy .env.example to .env at the repo root and set:
HF_HOME — shared model cache (default ~/ml-models)HF_TOKEN — optional Hugging Face token for higher rate limitsNotebooks / CLIs in hf-text-to-speech, mflux-text-to-image, and rembg-background-removal load this file via python-dotenv. .env is gitignored.
| Name | Description |
|---|---|
| naive-bayes-text-classification | Multinomial Naive Bayes text classification on 20 Newsgroups |
| hog-svm-face-detection | HOG features + linear SVM face detector |
| gmm-handwritten-digit-generation | PCA + GMM to synthesize handwritten digits |
| isomap-gaussian-nb-digit-classification | Isomap embedding + GaussianNB digit classification |
| hf-text-to-speech | Local TTS with hexgrad/Kokoro-82M from Hugging Face |
| mflux-text-to-image | FLUX.1-schnell via mflux/MLX (4-bit; not HF diffusers) |
| rembg-background-removal | Batch background removal with danielgatis/rembg |