Spaces:
Running
Running
Update sroie_inference.py
Browse files- sroie_inference.py +3 -3
sroie_inference.py
CHANGED
@@ -6,9 +6,9 @@ from transformers import LayoutLMv3TokenizerFast, LayoutLMv3Processor, LayoutLMv
|
|
6 |
from utils import OCR, unnormalize_box
|
7 |
|
8 |
|
9 |
-
tokenizer = LayoutLMv3TokenizerFast.from_pretrained("mp-02/layoutlmv3-
|
10 |
-
processor = LayoutLMv3Processor.from_pretrained("mp-02/layoutlmv3-
|
11 |
-
model = LayoutLMv3ForTokenClassification.from_pretrained("mp-02/layoutlmv3-
|
12 |
|
13 |
id2label = model.config.id2label
|
14 |
label2id = model.config.label2id
|
|
|
6 |
from utils import OCR, unnormalize_box
|
7 |
|
8 |
|
9 |
+
tokenizer = LayoutLMv3TokenizerFast.from_pretrained("mp-02/layoutlmv3-base-sroie", apply_ocr=False)
|
10 |
+
processor = LayoutLMv3Processor.from_pretrained("mp-02/layoutlmv3-base-sroie", apply_ocr=False)
|
11 |
+
model = LayoutLMv3ForTokenClassification.from_pretrained("mp-02/layoutlmv3-base-sroie")
|
12 |
|
13 |
id2label = model.config.id2label
|
14 |
label2id = model.config.label2id
|