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
Update ocr_qa_assessment.py
Browse files- ocr_qa_assessment.py +3 -1
ocr_qa_assessment.py
CHANGED
|
@@ -1,5 +1,7 @@
|
|
| 1 |
from transformers import Pipeline
|
| 2 |
-
|
|
|
|
|
|
|
| 3 |
|
| 4 |
class QAAssessmentPipeline(Pipeline):
|
| 5 |
|
|
|
|
| 1 |
from transformers import Pipeline
|
| 2 |
+
import torch
|
| 3 |
+
if not hasattr(torch, "auto"):
|
| 4 |
+
torch.auto = torch.float32
|
| 5 |
|
| 6 |
class QAAssessmentPipeline(Pipeline):
|
| 7 |
|