GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - reddimohan/productionize-machine-learning-models: A guide to productionize Machine Learning models using Flask rest api

BranchesTags
Open more actions menu

Latest commit

 

History

12 Commits
12 Commits

Folders and files

NameName
Last commit message
Last commit date
apis
apis
 
 
models
models
 
 
uploads
uploads
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
_config.yml
_config.yml
 
 
app_server.py
app_server.py
 
 
config.yml
config.yml
 
 
requirements.txt
requirements.txt
 
 
wsgi.py
wsgi.py
 
 

Repository files navigation

Flask template to productionize Machine learning models

Screenshot

Imgur

Required python version

$ python --version
Python 3.5.5

Flask Library

  • Flask-RESTPlus

Steps to setup

Clone repo ...

$ git clone https://<your-user-id>@bitbucket.org/productionize-ml-model.git
Create new virtual env using anaconda
$ conda create --name <proj_name35> python=3.5
Activate virtual env
$ source activate <proj_name35>
Model

Sample model (the model I used for this tutorial) can be download from the below link. Script that I used to train the model is https://github.com/reddimohan/Custom-image-classification-using-Inception-v3

Model link: https://1drv.ms/u/s!ArDo8DV9hhHCgTL-SFawrYAmU_DT?e=1TZYw6
Install libraries
$ pip install -r requirements.txt
Run the REST api in local with debug level
$ cd productionize-ml-model/
$ python app_server.py --debug
Run API in production mode
$ gunicorn --bind 0.0.0.0:5000 wsgi:application -w 1
Digitalocean has very good tutorial on deploying this to nginx, gunicorn so that it accepts multiple requests
https://www.digitalocean.com/community/tutorials/how-to-serve-flask-applications-with-gunicorn-and-nginx-on-ubuntu-16-04

About

A guide to productionize Machine Learning models using Flask rest api

Topics

flaskflask-restplusgunicorn-with-flask-rest-apimachine-learningproduction-ready

Resources

Readme
MIT license
Activity
Custom properties

Stars

0 stars

Watchers

0 watching

Forks

2 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.