Making Predictions with a Tensorflow/Keras Model on a Webpage
After your TF/Keras model is built how do you deploy it to a webpage so people can make predictions? TLDR: You need to convert your model to tensorflow.js so you can run it on your browser. Pre-Req -Your finished model -A way to load files to an http/https page (ex: github) - - - - - - - - - - Steps 1. Import tensorflowjs through your cmd or whatever you use: import tensorflowjs as tfjs 2. Wherever you've made your Keras model, convert your model to a tensorflow.js layers format and export it: tfjs.converters.save_keras_model(<your_model>, <dir path and name of your save location>) This will save a .json file with the model architecture/graph (description of the layers and their connections), and a .bin file with the sharded model weight files in binary format 3. On your HTML page, include tensorflowjs < script type = " text/javascript " src = " h...