Tools used: Keras, TensorFlow.js, Javascript, HTML
Steps to run : Open a new terminal, Go to the required directory and enter the following command
python3 -m http.server 8001
Note : Here 8001 is the port number.You can choose any available port number of your choice.
Now, open a browser and open the link provided in the terminal window!
- Create a keras model for a task ( image classification in this case )
- Convert keras model to tfjs.layers format using the following code which gives a model.json file as output :
tensorflowjs_converter --input_format keras \
path_to_keras_model.h5 \
path/to/tfjs_target_dir
- Create a simple HTML application and load model, images in it and make predictions using tensorflow.js.