mp-02 commited on
Commit
b3d156d
1 Parent(s): e3e9c8c

Update sroie_inference.py

Browse files
Files changed (1) hide show
  1. 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-finetuned-sroie", apply_ocr=False)
10
- processor = LayoutLMv3Processor.from_pretrained("mp-02/layoutlmv3-finetuned-sroie", apply_ocr=False)
11
- model = LayoutLMv3ForTokenClassification.from_pretrained("mp-02/layoutlmv3-finetuned-sroie")
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