mp-02 commited on
Commit
9b31f19
1 Parent(s): 129680c

Update cord_inference.py

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