Spaces:
Sleeping
Sleeping
Update cord_inference.py
Browse files- cord_inference.py +3 -3
cord_inference.py
CHANGED
@@ -5,9 +5,9 @@ from PIL import Image, ImageDraw, ImageFont
|
|
5 |
from utils import OCR, unnormalize_box
|
6 |
|
7 |
|
8 |
-
tokenizer = LayoutLMv3TokenizerFast.from_pretrained("mp-02/layoutlmv3-
|
9 |
-
processor = LayoutLMv3Processor.from_pretrained("mp-02/layoutlmv3-
|
10 |
-
model = LayoutLMv3ForTokenClassification.from_pretrained("mp-02/layoutlmv3-
|
11 |
|
12 |
id2label = model.config.id2label
|
13 |
label2id = model.config.label2id
|
|
|
5 |
from utils import OCR, unnormalize_box
|
6 |
|
7 |
|
8 |
+
tokenizer = LayoutLMv3TokenizerFast.from_pretrained("mp-02/layoutlmv3-base-cord", apply_ocr=False)
|
9 |
+
processor = LayoutLMv3Processor.from_pretrained("mp-02/layoutlmv3-base-cord", apply_ocr=False)
|
10 |
+
model = LayoutLMv3ForTokenClassification.from_pretrained("mp-02/layoutlmv3-base-cord")
|
11 |
|
12 |
id2label = model.config.id2label
|
13 |
label2id = model.config.label2id
|