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