How to use
You can use this model with Transformers pipeline for NER.
from transformers import pipeline
MODEL_NAME = "emanuelaboros/lang-detect"
lang_pipeline = pipeline("lang-detect", model=MODEL_NAME,
trust_remote_code=True,
device='cpu')
sentence = """En l'an 1348, au plus fort des ravages de la peste noire à travers l'Europe,
le Royaume de France se trouvait à la fois au bord du désespoir et face à une opportunité."""
langs = lang_pipeline(sentence)
langs
{'label': 'fr', 'confidence': 99.87}
Works with lists of sentences also.
BibTeX entry and citation info
- Downloads last month
- 392
Inference Providers
NEW
This model is not currently available via any of the supported Inference Providers.
The model cannot be deployed to the HF Inference API:
The HF Inference API does not support model that require custom code execution.