huggingface-js

Integrate Hugging Face models into JavaScript apps via Transformers.js and the Inference API.

4|Updated Jan 15, 2026
One-click install
npx skills add https://github.com/mgd34msu/goodvibes-gemini --skill huggingface-js
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: huggingface-js
Source: https://github.com/mgd34msu/goodvibes-gemini/tree/main/skills/huggingface-js
Command: npx skills add https://github.com/mgd34msu/goodvibes-gemini --skill huggingface-js

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill enables developers to integrate powerful machine learning models directly into their JavaScript applications, both in the browser and Node.js environments, without needing dedicated backend ML infrastructure.

Core Features & Use Cases

  • Local Inference: Run a wide variety of ML tasks (text generation, classification, embeddings, etc.) directly in the browser or Node.js using Transformers.js.
  • Hugging Face Inference API: Easily call hosted models for tasks like text generation, image generation, and speech recognition without managing infrastructure.
  • Use Case: A web application needs to provide real-time sentiment analysis on user comments. This Skill can be used to run a sentiment classification model directly in the user's browser using Transformers.js, providing instant feedback without a server roundtrip.

Quick Start

Use the huggingface-js skill to generate text using the gpt2 model with the prompt 'The future of AI is'.

Frequently Asked Questions about huggingface-js

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

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

Local inference in JavaScript runs ML models directly in the browser or Node.js using Transformers.js and ONNX Runtime. This allows tasks like text classification and embeddings to execute without server roundtrips or dedicated backend ML infrastructure.

Can I use Hugging Face models for text generation and image generation in Node.js?

Yes, you can access Hugging Face models in Node.js for text and image generation. The Skill integrates the Hugging Face Inference API for hosted model access and Transformers.js for local execution, supporting diverse tasks across both environments.

Does Transformers.js support WebGPU acceleration for browser inference?

Yes, Transformers.js supports WebGPU acceleration for browser inference. The Skill leverages ONNX Runtime for efficient local model execution and provides examples for utilizing WebGPU acceleration alongside Next.js integration.

What is the difference between local inference and the Hugging Face Inference API in JavaScript?

Local inference runs models directly in the browser or Node.js via Transformers.js, eliminating server roundtrips. The Hugging Face Inference API calls hosted models remotely, avoiding local resource demands while still executing tasks like speech recognition.

How do I perform sentiment analysis directly in the browser using JavaScript?

You can perform sentiment analysis in the browser by running a classification model locally via Transformers.js. This provides real-time feedback on user comments without requiring a server roundtrip or backend ML infrastructure.

Do I need Python to use Hugging Face transformers for machine learning?

No, you do not need Python to use Hugging Face transformers for machine learning. This Skill integrates Hugging Face capabilities directly into JavaScript applications, supporting inference tasks natively in browser and Node.js environments.