Uploaded October 2025 | Updated September 2026, 1 week ago
Welcome to a new series all about working with machine learning models in JavaScript in the browser using the Transformers.js library! In this introduction, I cover what Transformers.js is, how to load it into a p5.js sketch, explain the pipeline API, and demonstrate sentiment analysis and language detection examples. Code: thecodingtrain.com/tracks/transformers-js/transformers-js/introduction
π Watch this video ad-free on Nebula nebula.tv/videos/codingtrain-machine-learning-in-the-browser
p5.js Web Editor Sketches:
πΉοΈ Sentiment Analysis: editor.p5js.org/codingtrain/sketches/JaXqVSHxM
πΉοΈ Language Detection: editor.p5js.org/codingtrain/sketches/VmS9V6-0o
References:
π» Transformers.js Documentation: huggingface.co/docs/transformers.js
π€ Hugging Face: huggingface.co
π€ Hugging Face Models: huggingface.co/models?library=transformers.js
π€ Xenova on Hugging Face: huggingface.co/Xenova
π€ Whisper Web: huggingface.co/spaces/Xenova/whisper-web
π» p5.js 2.0 reference: beta.p5js.org
π ES6 Modules: developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules
π Quantization: huggingface.co/docs/optimum/concept_guides/quantization
Videos:
π youtube.com/playlist?list=PLRqwX-V7Uu6YPSwT06y_AEYTqIwbeam3y
π youtu.be/0Ad5Frf8NBM
Timestamps:
0:00 Welcome!
1:53 Why JavaScript and not Python?
3:01 What is Hugging Face?
4:03 Transformers.js Documentation
4:18 Pipeline API
5:41 import syntax and ES6 modules
8:34 Object Destructuring
11:33 Creating a Pipeline
13:18 Sentiment Analysis Example
19:04 Tasks and Models on Hugging Face
20:20 Language Detection Example
22:27 Device: WebGPU, CPU and more
24:25 Data Types and Quantization
27:54 See you next time!
Editing by Mathieu Blanchette
Animations by Jason Heglund
Music from Epidemic Sound
π Website: thecodingtrain.com
πΎ Share Your Creation! thecodingtrain.com/guides/passenger-showcase-guide
π© Suggest Topics: github.com/CodingTrain/Suggestion-Box
π‘ GitHub: github.com/CodingTrain
π¬ Discord: thecodingtrain.com/discord
π Membership: youtube.com/thecodingtrain/join
π Store: standard.tv/codingtrain
ποΈ Twitter: twitter.com/thecodingtrain
πΈ Instagram: instagram.com/the.coding.train
π₯ youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
π₯ youtube.com/playlist?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA
π p5.js: p5js.org
π p5.js Web Editor: editor.p5js.org
π Processing: processing.org
π Code of Conduct: github.com/CodingTrain/Code-of-Conduct
This description was auto-generated. If you see a problem, please open an issue: github.com/CodingTrain/thecodingtrain.com/issues/new
#machinelearning #transformersjs #huggingface #sentimentanalysis #languagedetection #naturallanguageprocessing #pipelineapi #asyncawait #es6modules #javascript #p5js #transformersjs
Welcome to a new series all about working with machine learning models in JavaScript in the browser using the Transformers.js library! In this introduction, I cover what Transformers.js is, how to load it into a p5.js sketch, explain the pipeline API, and demonstrate sentiment analysis and language detection examples. Code: thecodingtrain.com/tracks/transformers-js/transformers-js/introduction
π Watch this video ad-free on Nebula nebula.tv/videos/codingtrain-machine-learning-in-the-browser
p5.js Web Editor Sketches:
πΉοΈ Sentiment Analysis: editor.p5js.org/codingtrain/sketches/JaXqVSHxM
πΉοΈ Language Detection: editor.p5js.org/codingtrain/sketches/VmS9V6-0o
References:
π» Transformers.js Documentation: huggingface.co/docs/transformers.js
π€ Hugging Face: huggingface.co
π€ Hugging Face Models: huggingface.co/models?library=transformers.js
π€ Xenova on Hugging Face: huggingface.co/Xenova
π€ Whisper Web: huggingface.co/spaces/Xenova/whisper-web
π» p5.js 2.0 reference: beta.p5js.org
π ES6 Modules: developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules
π Quantization: huggingface.co/docs/optimum/concept_guides/quantization
Videos:
π youtube.com/playlist?list=PLRqwX-V7Uu6YPSwT06y_AEYTqIwbeam3y
π youtu.be/0Ad5Frf8NBM
Timestamps:
0:00 Welcome!
1:53 Why JavaScript and not Python?
3:01 What is Hugging Face?
4:03 Transformers.js Documentation
4:18 Pipeline API
5:41 import syntax and ES6 modules
8:34 Object Destructuring
11:33 Creating a Pipeline
13:18 Sentiment Analysis Example
19:04 Tasks and Models on Hugging Face
20:20 Language Detection Example
22:27 Device: WebGPU, CPU and more
24:25 Data Types and Quantization
27:54 See you next time!
Editing by Mathieu Blanchette
Animations by Jason Heglund
Music from Epidemic Sound
π Website: thecodingtrain.com
πΎ Share Your Creation! thecodingtrain.com/guides/passenger-showcase-guide
π© Suggest Topics: github.com/CodingTrain/Suggestion-Box
π‘ GitHub: github.com/CodingTrain
π¬ Discord: thecodingtrain.com/discord
π Membership: youtube.com/thecodingtrain/join
π Store: standard.tv/codingtrain
ποΈ Twitter: twitter.com/thecodingtrain
πΈ Instagram: instagram.com/the.coding.train
π₯ youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
π₯ youtube.com/playlist?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA
π p5.js: p5js.org
π p5.js Web Editor: editor.p5js.org
π Processing: processing.org
π Code of Conduct: github.com/CodingTrain/Code-of-Conduct
This description was auto-generated. If you see a problem, please open an issue: github.com/CodingTrain/thecodingtrain.com/issues/new
#machinelearning #transformersjs #huggingface #sentimentanalysis #languagedetection #naturallanguageprocessing #pipelineapi #asyncawait #es6modules #javascript #p5js #transformersjs










