A simple web application to predict the handwritten digit
-Python==3.6.5 -Tensorflow==1.5 -Tensorflowjs==1.6
-Create a basic model using tensorflow and keras to predict the digit using mnist dataset
-Save the created keras model into a .h5 file
model.save(�model.h5�)
-Create a seperate virtual environment and install tensorflowjs
pip install tensorflowjs
Tensorflowjs_converter �input_format=keras path\to.h5 file path\to\target_folder
Two files namely Group1-shard1 of 1 Model.json Will be created and will be used
-Create a file namely tfjs.html to include all the frontend part and tensorflow converted model and prediction to be made
tf.loadLayersModel('model/model.json')
window.model.predict([tf.tensor(input).reshape([1, 28, 28, 1])]).array()
Complete frontend code available in tfjs.html