Image-to-Text
Transformers
Safetensors
Tibetan
vision-encoder-decoder
image-text-to-text
ocr
tibetan
document-ai
trocr
Instructions to use TibetanCodexAITeam/PechaBridgeOCR with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TibetanCodexAITeam/PechaBridgeOCR with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "image-to-text" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # 'pip install "transformers<5.0.0' from transformers import pipeline pipe = pipeline("image-to-text", model="TibetanCodexAITeam/PechaBridgeOCR")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("TibetanCodexAITeam/PechaBridgeOCR") model = AutoModelForMultimodalLM.from_pretrained("TibetanCodexAITeam/PechaBridgeOCR", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Upload DONUT checkpoint checkpoint-154000 via PechaBridge
Browse files
repro/text_normalization.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"unicode_normalization": "NFC",
|
| 3 |
+
"newline_normalization": "\\r\\n and \\r -> \\n",
|
| 4 |
+
"special_token_cleanup": "tokenizer.batch_decode(skip_special_tokens=True) plus explicit string removal of tokenizer.all_special_tokens",
|
| 5 |
+
"zero_width_removed": [
|
| 6 |
+
"\\u200b",
|
| 7 |
+
"\\u200c",
|
| 8 |
+
"\\u200d",
|
| 9 |
+
"\\ufeff"
|
| 10 |
+
],
|
| 11 |
+
"whitespace_normalization": "collapse horizontal spaces/tabs, trim around newlines, strip",
|
| 12 |
+
"metric_newline_token": "<NL>"
|
| 13 |
+
}
|