based on ml5.js example but without using other javascript libraries like p5.js
you will need to run a local server to use this without hosting it online.
this is easy to do from the terminal!
do you already have node.js with npm package manager installed? install it here
using node/npm, enter the following in the terminal:
$ cd PATH/TO/WHERE/YOU/SAVED/THIS
$ sudo npm install http-server -g
$ http-server
visit the address that loads
Note: in this version, index.html contains all the JS but could also be separated into another file. It also has been stripped of P5.js and other dependencies.