A Streamlit-based interactive machine learning application for predicting the species of iris flowers using multiple classifiers. This app supports single predictions, batch predictions via CSV, visualizations, and SHAP-based interpretability.
- Model Selection: Random Forest, SVM, Logistic Regression
- Single Prediction: Enter feature values using sliders
- Batch Prediction: Upload CSV and get predictions with download option
- Data Visualizations: Pairplots, scatterplots
- Model Evaluation: Accuracy, confusion matrix, classification report
- SHAP Explanation: Visual force plot for Random Forest predictions
- Custom Training: Upload your own training dataset (with the same structure)
Streamlit_ml_app/
βββ classification.py # Main Streamlit app
βββ requirements.txt # Python dependencies
βββ README.md # Project documentation- Clone the repository
git clone https://github.com/yourusername/Streamlit_ml_app.git
cd Streamlit_ml_app- Create and activate a virtual environment (optional but recommended)
python -m venv .venv
# Activate it
# On Windows:
.venv\Scripts\activate
# On macOS/Linux:
source .venv/bin/activate- Install dependencies
pip install -r requirements.txt- Run the app
streamlit run classification.py- Choose a model from the sidebar.
- Set hyperparameters and provide input for single prediction.
- Upload a CSV file for batch prediction (same column format as iris dataset).
- View model metrics and SHAP explanations if using Random Forest.
- (Optional) Upload your own dataset for training under "Custom Training Data".
sepal length (cm),sepal width (cm),petal length (cm),petal width (cm)
5.1,3.5,1.4,0.2
6.2,3.4,5.4,2.3
...
MIT License Β© 2025 Sameer017
