This repository gives ready made template to deploy deep learning model using flask.
-
Clone this repository :
git clone https://github.com/goutham-nekkalapu/deploying_ML_models -
Install the requirements :
pip install -r requirements.txtIf you want to have different versions of python and other deep learning libraries, you can use Anaconda to create environments.
-
Start the server:
python flask_server.py -
To use the model deployed, run the client program :
python flask_client.py
For the image
The response from server, has the top-5 predictions, as below:
{ "1": [ "hotdog", "0.491872" ], "2": [ "bagel", "0.139255" ], "3": [ "french loaf", "0.107473" ], "4": [ "pretzel", "0.0680968" ], "5": [ "plate", "0.0374931" ] }
The deep learning model deployed here is ResNet-50 and keras library V2.0 is used, this can be modified accordingly to your needs.