Views
No views yet
1import { pipeline } from '@xenova/transformers';
2
3const classifier = await pipeline('text-classification', 'nicoamoretti/roberta-openai-detector-onnx');
4
5const result = await classifier('Your text here');
6console.log(result);
7// [{ label: 'Real', score: 0.95 }] - Human written
8// [{ label: 'Fake', score: 0.85 }] - AI generated| Label | Meaning |
|---|---|
Real | Human-written text |
Fake | AI-generated text (GPT-2 era models) |