Token Classification
Transformers
French
German
ocr_qa_assessment
ocr
bloomfilter
unigram
impresso
quality-assessment
v1.0.6
custom_code
Instructions to use impresso-project/ocr-quality-assessor-unigram-light with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use impresso-project/ocr-quality-assessor-unigram-light with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="impresso-project/ocr-quality-assessor-unigram-light", trust_remote_code=True)# Load model directly from transformers import AutoModelForTokenClassification model = AutoModelForTokenClassification.from_pretrained("impresso-project/ocr-quality-assessor-unigram-light", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
metadata
library_name: transformers
language:
- en
- fr
- de
tags:
- v1.0.0
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