Token Classification
Transformers
langident
language-identification
multilingual
historical
impresso
custom_code
Run this model with HF Jobs
Run impresso-project/language-identifier on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/impresso-project/language-identifier. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/impresso-project/language-identifier on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use impresso-project/language-identifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use impresso-project/language-identifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="impresso-project/language-identifier", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForTokenClassification model = AutoModelForTokenClassification.from_pretrained("impresso-project/language-identifier", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse filesChange name of pipeline to correspond to HF repository name and impresso conventions.
12345678910111213141516171819202122232425---license: agpl-3.0---## How to run:```pythonfrom transformers import pipelineMODEL_NAME = "impresso-project/impresso-langident"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)print(langs)12345678910111213141516171819202122232425---license: agpl-3.0---## How to run:```pythonfrom transformers import pipelineMODEL_NAME = "impresso-project/impresso-langident"lang_pipeline = pipeline("langident",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)print(langs)
README.md+25-25