Boilerplate template to build end-end to machine learning model using scikit-learn and deploy the model as REST api using Flask
This boilerplate template provides two end points, one is create_model
which takes the dataset file and the target field then build training pipeline and persist the model.
The second endpoint is predict
for model inference, which takes single record and produces the model prediction.
-
Clone the repository
git clone https://github.com/kantharajucn/ML_web_server_boilerplate
-
change directory into the repo
cd path/to/ML_web_server
-
Install requirements
pip install -r requirements.txt
-
Run Flask application
make run
-
Run tests
make test
-
Build docker image
make docker-build
-
Run docker image
make docker-run
-
Run tests
make docker-test
-
Stop docker container
make docker-down
Web server is available on the port 8000.