Instructions to use qmaru/language_detection with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use qmaru/language_detection with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('text-classification', 'qmaru/language_detection');
|
Download README.md from qmaru/language_detection: direct link, hf CLI and curl.
- Browser
- Download file 829 Bytes
-
https://huggingface.co/qmaru/language_detection/resolve/main/README.md
- Command line
-
hf download hf://qmaru/language_detection/README.md
-
curl -L -o README.md https://huggingface.co/qmaru/language_detection/resolve/main/README.md
829 Bytes
| license: mit | |
| base_model: alexneakameni/language_detection | |
| library_name: transformers.js | |
| pipeline_tag: text-classification | |
| https://huggingface.co/alexneakameni/language_detection with ONNX weights to be compatible with Transformers.js. | |
| ```javascript | |
| 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 } | |
| // ] | |
| ``` |