Production-ready Machine Learning App built with KNN, deployed on Streamlit
๐ Real-time Predictions โข ๐ Model Insights โข โ๏ธ Interactive Tuning
๐ Live Demo โข โ๏ธ Setup โข ๐ Performance
โ End-to-end ML pipeline (Data โ Model โ Deployment) โ Clean IPO Architecture (Input โ Process โ Output) โ Real-time predictions with probability confidence โ Proper evaluation using F1 Score (not just accuracy) โ Interactive UI for model tuning (K selection) โ Deployed and accessible globally
๐ https://irisclassifier-project.streamlit.app/
โ No installation required โ Works on mobile & desktop
This project demonstrates how to build a production-ready machine learning application from scratch.
- 150 samples
- 3 classes
- 4 numerical features
| Species | Setosa | Versicolor | Virginica |
|---|---|---|---|
| Emoji | ๐ท | ๐ผ | ๐บ |
-
Input flower measurements
-
Get:
- ๐ฏ Predicted class
- ๐ Probability distribution
- ๐ฅ Confidence score
- Confusion Matrix
- F1 Score (per class)
- Classification report
- Adjust K (1โ20)
- Visualize performance curves
| K Range | Behavior |
|---|---|
| 1โ2 | |
| 5 | โ Optimal |
| 15+ |
- Raw data view
- Feature distributions
- Scatter plots
| Metric | Score |
|---|---|
| Accuracy | ~96% |
| F1 Score (Macro) | ~96% |
[[10 0 0]
[ 0 10 0]
[ 0 1 9]]
INPUT
- Load dataset
- Train/test split (80/20)
- Feature scaling (StandardScaler)
PROCESS
- KNN (K=5)
- Euclidean distance
- Majority voting
OUTPUT
- Predictions
- Metrics (Accuracy, F1)
- Confusion Matrix
| Category | Tools |
|---|---|
| Frontend | Streamlit |
| ML | Scikit-learn |
| Data | Pandas, NumPy |
| Visualization | Matplotlib, Seaborn |
| Deployment | Streamlit Cloud |
git clone https://github.com/yourusername/iris-classifier.git
cd iris-classifier
python -m venv venv
source venv/bin/activate # Mac/Linux
# venv\Scripts\activate # Windows
pip install -r requirements.txt
streamlit run app.pypython classifier.pyiris-classifier/
โโโ app.py
โโโ classifier.py
โโโ requirements.txt
โโโ .streamlit/
- Data preprocessing & scaling
- KNN (distance-based learning)
- Model evaluation (F1 Score)
- Confusion matrix interpretation
- Hyperparameter tuning (K selection)
- Probability-based predictions
Deployed on Streamlit Cloud
- Push to GitHub
- Go to https://share.streamlit.io
- Select repo
- Deploy
โ Auto redeploy on push
Egwuatu Chibuike Dominion AI Engineer
๐ฉ chibuikedominion7@gmail.com
๐ก This project reflects my ability to build real-world AI applications โ not just models, but complete user-facing systems.
โญ Star this repo if you found it valuable!
