tfjs-examples
Examples built with TensorFlow.js
This repository is a collection of example projects built with TensorFlow.js, which is a library that lets you run machine learning models directly in a web browser or in a JavaScript server environment. Each example lives in its own folder and can be copied independently into another project.
TensorFlow.js itself is a tool for building and running AI models using JavaScript, so developers familiar with web development can work with machine learning without switching to Python. The examples in this repository cover a wide range of tasks: classifying images, predicting numbers from data, generating text, training a model to balance a virtual pole, converting dates written in one format to another, and more.
Some examples run entirely in the browser, while others use Node.js on a server. Several demonstrate how to train a model in one environment and then load it somewhere else, such as training in Node.js and running the result in a browser. The collection also includes examples for less common scenarios like running a model inside a Chrome browser extension or inside an Electron desktop application.
Each entry in the readme table shows what kind of data the example uses, what kind of task it performs, and whether it trains the model, runs predictions, or both. Many examples have a live demo link so you can try them in a browser without downloading anything.
This is an official repository maintained by the TensorFlow team at Google. It serves as a practical reference for developers learning how to use TensorFlow.js or looking for working starting points for specific problem types.