This repo is a POC about using a trained Keras model with MNIST database with TensorFlow.js and React.js!
Switch branches/tags
Nothing to show
Clone or download
Permalink
Failed to load latest commit information.
keras Initial commit May 5, 2018
public Add renderprops support May 6, 2018
src Add renderprops support May 6, 2018
.gitignore Initial commit May 5, 2018
README.md Add renderprops support May 6, 2018
package-lock.json Update package May 5, 2018
package.json Update package May 5, 2018
yarn.lock Update package May 5, 2018

README.md

Number recognition with MNIST data (React.js and TensorFlow.js)

This repo is a POC about using a trained Keras model with MNIST database with TensorFlow.js and React.js!

Getting started

  • yarn install
  • npm start

DEMO

demo

Code

With RenderProps:

<NumberRecognition
    width={400}
    height={400}
>
{
    (predictedNumber, predictions) => (
        <h1>{predictedNumber}</h1>
    )
}
</NumberRecognition>

Without RenderProps:

<NumberRecognition
    width={400}
    height={400}
    onPredict={
        (number, predictions) => 
        console.log(number, predictions)
    }
    onClear={() => console.log('onClear')}
/>