Skip to content

sampathweb/iris-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sample IRIS API Application

Build IRIS Machine Learning Model using Scikit-Learn and deploy using Tornado Web Framework.

Setup Environment on Local Machine

Installation

cookiecutter https://github.com/sampathweb/cc-iris-api

cd <repo>  # cd iris-api

# Install Packages
python env/create_env.py
source activate env/venv  # Windows users: activate env/venv
python env/install_packages.py

# Build the Model
python ml_src/build_model.py

# Run the App
python run.py

Test App

  1. Open Browser: http://localhost:9000

  2. Command Line:

curl -i http://localhost:9000/api/iris/predict -X POST -d '{ "sepal_length": 2, "sepal_width": 5, "petal_length": 3, "petal_width": 4}'
  1. Jupyter Notebook:

Open new terminal navigate to the new folder iris-api. Start jupyter notebook. Open ml_src -> api_client.ipynb. Test the API.

Api works!

Credits:

Template from https://github.com/sampathweb/cc-iris-api

The End.

Releases

No releases published

Packages

No packages published