Skip to content
Back to Libraries

Transformers.js

12k

Run Hugging Face transformers in the browser

⚡ WASM🔥 TrendingMachine Learning
License
Apache-2.0
Released
2023
Stars
12k

Use Cases

Text generation, translation, summarization, sentiment analysis, image classification

Code Example

import { pipeline } from '@xenova/transformers';
const classifier = await pipeline('sentiment-analysis');
const result = await classifier('I love this!');
// [{ label: 'POSITIVE', score: 0.99 }]

Related Libraries