This repo is a POC about using a trained Keras model with MNIST database with TensorFlow.js and React.js!
Predict numbers using MNIST database with TensorFlow.js and React.js!
author: Aral Roca [email protected]
npm install --save mnist-react-tfjs
Then:
import NumberRecognition from 'mnist-react-tfjs';
<NumberRecognition
width={400}
height={400}
>
{
(predictedNumber, predictions) => (
<h1>{predictedNumber}</h1>
)
}
</NumberRecognition>
<NumberRecognition
width={400}
height={400}
onPredict={
(number, predictions) =>
console.log(number, predictions)
}
onClear={() => console.log('onClear')}
/>