This is a demonstation of using Google's Teachable Machine with node.js
It use nest js as the app framework.
It is a rest API for getting a prediction based on a image model created with Teachable Machine.
The API exposes two endpoints:
- GET /health
- POST /predict
- Run
npm install
- Edit
.env
file with your model - Run app server with
npm start
- Post an image to the endpoint
/predict
Usage with Postman:
Response:
Usage with CURL:
curl -v -F "[email protected]" http://localhost:3000/predict
- This model is taken from here
- In next versions:
- Will add the ability to train the model
- Will enable to load model from the file system.