Last time, we worked with jupyter notebook and build our machine learning model.
Today, we will make a backend and will use this ML model into our backend.
We will use flask for creating our backend.
Create a python file named ‘api.py’ which will contain a method for sending the prediction using the ML model.
First create a virtual environment
Actiavate virtual environment (for windows)
Install all required libraries from requirement.txt
pip install requirements.txt
Run the api.py file
We are all set.
Check the localhost
We also deployed the backend at Heroku.
If you want the full code and structure which was deployed to the server then check our git only for backend from here.