A simple application to serve machine learning models over the network using REST APIs
1. Python3
2. scikit-learn
3. Numpy
4. Pandas
Iris
dataset has been used in this project.
It is saved in 'data/' folder under the root of this project.
python3 app.py
The above command will host the app on http://127.0.0.1:5000. Please check it out as we have an encouraging message for all our viewers.
Once the app is hosted. Hit the below URL
http://127.0.0.1:5000/train_decision_tree
After hitting the above URL, a decision tree is fit to IRIS data and is saved. It is now ready for evaluation and serving purpose.
Send a post request to the below URL with a JSON body containing the data for which prediction is required
http://127.0.0.1:5000/serve_decision_tree
Method: POST
Body: {"data":[0.1,1.1,0.4,0.8]}
Content Type: application/json
Find all he test cases under tests folder in the root of this project. Run the below command to test our methods
python3 test_controllers.py