You can directly use this model as a language detector, i.e. for sequence classification tasks. Currently, it supports the following 20 languages:
arabic (ar), bulgarian (bg), german (de), modern greek (el), english (en), spanish (es), french (fr), hindi (hi), italian (it), japanese (ja), dutch (nl), polish (pl), portuguese (pt), russian (ru), swahili (sw), thai (th), turkish (tr), urdu (ur), vietnamese (vi), and chinese (zh)
Usage
Optimum
Loading the model requires the
🤗 Optimum
library installed.
from optimum.onnxruntime import ORTModelForSequenceClassification
from transformers import AutoTokenizer, pipeline
tokenizer = AutoTokenizer.from_pretrained("laiyer/xlm-roberta-base-language-detection-onnx")
model = ORTModelForSequenceClassification.from_pretrained("laiyer/xlm-roberta-base-language-detection-onnx")
classifier = pipeline(
task="text-classification",
model=model,
tokenizer=tokenizer,
top_k=None,
)
classifier_output = ner("It's not toxic comment")
print(classifier_output)
xlm-roberta-base-language-detection-onnx huggingface.co is an AI model on huggingface.co that provides xlm-roberta-base-language-detection-onnx's model effect (), which can be used instantly with this protectai xlm-roberta-base-language-detection-onnx model. huggingface.co supports a free trial of the xlm-roberta-base-language-detection-onnx model, and also provides paid use of the xlm-roberta-base-language-detection-onnx. Support call xlm-roberta-base-language-detection-onnx model through api, including Node.js, Python, http.
xlm-roberta-base-language-detection-onnx huggingface.co is an online trial and call api platform, which integrates xlm-roberta-base-language-detection-onnx's modeling effects, including api services, and provides a free online trial of xlm-roberta-base-language-detection-onnx, you can try xlm-roberta-base-language-detection-onnx online for free by clicking the link below.
protectai xlm-roberta-base-language-detection-onnx online free url in huggingface.co:
xlm-roberta-base-language-detection-onnx is an open source model from GitHub that offers a free installation service, and any user can find xlm-roberta-base-language-detection-onnx on GitHub to install. At the same time, huggingface.co provides the effect of xlm-roberta-base-language-detection-onnx install, users can directly use xlm-roberta-base-language-detection-onnx installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
xlm-roberta-base-language-detection-onnx install url in huggingface.co: