transformers-js

Run Hugging Face machine learning models in JavaScript and TypeScript applications.

10.9k|724|Updated Nov 24, 2025
One-click install
npx skills add https://github.com/huggingface/skills --skill transformers-js-huggingface
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: transformers-js
Source: https://github.com/huggingface/skills/tree/main/skills/transformers-js
Command: npx skills add https://github.com/huggingface/skills --skill transformers-js-huggingface

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @huggingface/transformers, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill allows you to run advanced machine learning models directly in JavaScript/TypeScript, enabling you to integrate powerful AI capabilities into your web applications without the need for separate ML servers or Python environments.

Core Features & Use Cases

  • Run ML Models: Supports a wide range of tasks including NLP, computer vision, audio processing, and multimodal tasks.
  • Cross-Platform Support: Works in browsers and server-side runtimes like Node.js, Bun, and Deno.
  • Hugging Face Hub Access: Integrates with the Hugging Face Hub for access to a vast library of pre-trained models.
  • Use Case: If you need to perform text classification, translation, or image recognition in a JavaScript application, this Skill provides the necessary tools and models.

Quick Start

Use the transformers-js skill to run a text classification model on a given text input.

Frequently Asked Questions about transformers-js

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run machine learning models in JavaScript without a Python backend?

You can run machine learning models directly in JavaScript or TypeScript using pre-trained models from the Hugging Face Hub, eliminating the need for separate ML servers or Python environments. This enables AI integration in web applications.

Can I use Hugging Face models for text classification in a Node.js application?

Yes, you can perform text classification in Node.js applications. The library supports cross-platform runtimes including Node.js, Bun, and Deno, allowing you to load Hugging Face models for NLP tasks directly in JavaScript.

What types of AI tasks can I perform in the browser with JavaScript?

You can perform a wide range of AI tasks in the browser including NLP, computer vision, audio processing, and multimodal tasks. This covers use cases like text classification, translation, and image recognition using JavaScript and TypeScript.

Does transformers.js work with both JavaScript and TypeScript?

Yes, the library works with both JavaScript and TypeScript. It allows you to run state-of-the-art machine learning models in web applications and server-side runtimes, providing type support for integrating AI capabilities.

Do I need a separate ML server to do translation in my web application?

No, you do not need a separate ML server. You can run state-of-the-art translation models directly in the browser or server-side JavaScript environments using pre-trained models from the Hugging Face Hub.