Skip to content

yoke2/rps_tf2_flask_app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rock, Paper, Scissors Classifier App using Tensorflow 2 and Flask


Introduction

This repository shows the deployment of a Tensorflow 2 image classifier model based on the Rock, Paper, Scissors notebook demonstrated by Laurence Moroney (Please see references)

To generate the model, the Notebook is run in Google Colab with slight modifications (install tf2 beta package dependencies)

Model is then downloaded from Google Colab


Local Installation

Clone the repo

$ git clone https://github.com/yoke2/rps_tf2_flask_app.git

Install requirements

Note: Python 3.x and pip is required to be installed

$ pip install -r requirements.txt

Make sure you have the following installed:

  • tensorflow==2.0.0-beta1
  • flask
  • pillow
  • h5py
  • gevent

Model Generation

  1. Run Notebook in Google Colab
  2. Download rps.h5 model and put in models folder (already provided)

Run with Python

Python 3.7+ is tested.

  1. Execute below line in command line
$ python app.py
  1. Open http://localhost:5000 in your browser to run the application

References:

  • Original Rock Paper Scissors Notebook by Laurence Moroney here
  • Original image classifier template here
  • Image classifier template updated for TF2 here
  • Tensorflow 2 beta reference here

About

Deploys a TensorFlow 2 model as flask webapp

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages