Skip to content
Deploys a tf2 model as flask webapp
Jupyter Notebook Other
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

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


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

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
  1. Open http://localhost:5000 in your browser to run the application


  • 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
You can’t perform that action at this time.