An open-source Streamlit web app to generate beautiful confusion matrices for multi-class machine learning models. Supports numeric and string labels, CSV upload, manual label entry, custom color maps, and displays evaluation metrics like Accuracy, Precision, Recall, and F1-score. Users can download the confusion matrix as an image.
- Confusion matrices for binary & multi-class models
- Numeric and string label support
- CSV upload or manual input
- Custom color maps
- Accuracy, Precision, Recall & F1-score
- Downloadable matrix image
- Open-source Streamlit web app
Try the app live here:
🔗 https://confusion-matrix-gen.streamlit.app
No installation required — simply upload a CSV file or enter labels manually and generate confusion matrices instantly.
Follow these steps to run the Confusion Matrix Generator on your local machine.
Open your terminal and run:
git clone https://github.com/pareshrnayak/confusion-matrix-generator.gitcd confusion-matrix-generatorMake sure Python and pip are installed before running this command.
pip install -r requirements.txtVirtual Environments (
venv) are optional. This works without creating one.
python -m streamlit run app.pyOnce the app starts, you will see a local URL like:
http://localhost:8501Open it in your browser to use the app.
confusion-matrix-generator/
├── app.py # Main Streamlit application
├── requirements.txt # Python dependencies
├── README.md # Project overview
├── assets/
│ └── mockup.png # UI mockup image
├── .gitignore # Ignored files
└── LICENSE # MIT LicenseContributions, issues, and feature requests are welcome!
Feel free to fork this repo and submit a pull request.
This project is open-source and free to use under the MIT License.
