This is an end to end machine learning project. The aim of this project is to develop a machine learning model and deploy as a web service.
Functional requirements:
- User should should be able to login with their credentials
- User should be able to make prediction
Non functional requirements:
- The system should be highly available
- The system should perform at an excellent level
- The system should be compatible with any operation system e.g Mac OS, Windows, iOS, Android
- Build a model that will provide a solution
- Wrap and host in a simple web service (Flask)
- Build a small app (UI - CSS and HTML) that uses it
- Set up a CI/CD retraining pipeline
- set up a monitoring device (Aporia, WhyLabs)
Requirements
- Flask / Django
- Machine learning knwoledge
- Software development
- Devops
- To use the web service, click this link
On your terminal:
- Initialize a git repository in your preferred directory using:
git init
- Clone the repository to your local repository using:
Now you should see all the project files in your directorygit clone https://github.com/Tobi-Ade/Machine-Learning-Deployment.git
- Navigate into the flask app directory by running:
cd ".\flask app"
- The requirements.txt file contains all the dependencies needed to run the project successfully. You can install these by running:
pip install -r requirements.txt
- Now that all the dependencies are installed, you can simply start the api by running:
python app.py
The flask api should start running at this stage. You can send a request and get instant results, or copy the url where the api is running and paste it in your browser, where you can interact with the api.
- The request.py file contains a sample request. To use this, keep the api running and open an new terminal window, navigate to the current directory, then run:
python request.py
The request.py file can also be modified to see how the result changes. You can also create a custom request using the same format in the request.py.
- Navigate into the django app directory by running:
cd ".\Django app"
- The requirements.txt file contains all the dependencies needed to run the project successfully. You can install these by running:
pip install -r requirements.txt
- Navigate into the project directory by running
cd deployment
- If you check all the files in this directory you can find the manage.py file whihc is needed to run the app (mlApp). Now run:
python manage.py runserver
- If you have a preferred address where you wish to run the server, you can do that by adding the address after "runserver". Example:
python manage.py runserver 127.0.0.1:8080
This means the server will run on "127.0.0.1:8080"
Now you can copy the url where the serve is running and paste it in your browser, where you can interact with the web app.