Description: This repository contains a machine learning application developed using Flask, designed to demonstrate the deployment of a predictive model using Docker. The application leverages a ML classifier trained on the Iris dataset to make predictions based on user input.
This repository contains a machine learning application developed using Flask, designed to demonstrate the deployment of a predictive model using Docker. The application leverages a ML classifier trained on the Iris dataset to make predictions based on user input.
app.py: The main Flask application file that serves the ML model.Dockerfile: Instructions for building the Docker image for the application.model.pkl: The pre-trained machine learning model serialized as a pickle file.requirements.txt: List of Python dependencies required for the application.train_model.py: Script used to train the machine learning model.
- Docker installed on your system
- Git for version control
-
Clone the repository:
git clone https://github.com/yourusername/deploying-dockerized-ml-app.git cd deploying-dockerized-ml-app -
Build the Docker image:
docker build -t ml-app . -
Run the Docker container:
docker run -p 5000:5000 ml-app -
Access the application by navigating to
http://localhost:5000in your web browser.
The application provides a simple interface where users can input Iris flower measurements. Upon submission, the application uses the trained model to predict the Iris species.
To modify the model or retrain it:
- Update the
train_model.pyscript as needed. - Run the script to generate a new
model.pklfile:python train_model.py - Rebuild the Docker image to include the new model.
Contributions to improve the application or documentation are welcome. Please feel free to submit a Pull Request.
This project is open-source
