This project is focused on building a web application for Iris classification using Django, a high-level Python web framework. The application utilizes machine learning algorithms to classify Iris flowers based on their sepal and petal dimensions.
The application allows users to input sepal and petal dimensions of an Iris flower and predicts its class using the KNeighboursClassifier algorithm. The front-end is designed using Bootstrap CSS for responsiveness.
iris/
│
├── iris/ # Django project directory
│
├── irisApp/ # Django app directory
│ ├── templates/irisApp/ # HTML templates for the app
│ │ ├── layout.html # Base layout template
│ │ └── index.html # Home page template
│ │
│ └── static/irisApp/ # Static files for the app
│ ├── index.js # JavaScript file for front-end logic
│ └── styles.css # CSS file for styling
│
├── manage.py # Django management script
├── requirements.txt # Python dependencies
├── README.md # Project documentation (this file)
├── .gitignore # Git ignore file
└── LICENSE # Project license
- Clone this repository to your local machine.
- Navigate to the project directory.
- Create a virtual environment and activate it.
- Install the required dependencies using.
pip install -r requirements.txt
- run the classification file in
irisClassification.py
using this command:
cd irisApp
python irisClassification.py
- go back to your iris project using:
cd ..
- Make Migrations to establish your models in irisApp app using this command:
python manage.py makemigrations irisApp
- Migrate using :
python manage.py migrate
- Run the Django development server using:
python manage.py runserver
- Access the web application at http://localhost:8000/ in your browser.
- Follow the instructions on the homepage to classify Iris dataset samples.
- Django 4.1
- scikit-learn (for KNeighbourClassifier)
- Other dependencies listed in requirements.txt
- This project utilizes the Iris dataset available in scikit-learn.