https://huggingface.co/alexneakameni/language_detection with ONNX weights to be compatible with Transformers.js.
import { pipeline } from "@huggingface/transformers"
const classifier = await pipeline('text-classification', 'qmaru/language_detection')
const output = await classifier('I hate you!', { top_k: 6 })
console.log(output)
// [
// { label: 'eng_Latn', score: 0.6555308103561401 },
// { label: 'srd_Latn', score: 0.086576908826828 },
// { label: 'ita_Latn', score: 0.024977771565318108 },
// { label: 'als_Latn', score: 0.019376492127776146 },
// { label: 'fur_Latn', score: 0.016824522987008095 },
// { label: 'fra_Latn', score: 0.015999119728803635 }
// ]
- Downloads last month
- 25
Model tree for qmaru/language_detection
Base model
alexneakameni/language_detection