mp-02 commited on
Commit
7fe76ee
·
verified ·
1 Parent(s): d9fbb2d

Update cord_inference.py

Browse files
Files changed (1) hide show
  1. cord_inference.py +3 -3
cord_inference.py CHANGED
@@ -49,9 +49,9 @@ label_list = [
49
  id2label = dict(enumerate(label_list))
50
  label2id = {v: k for k, v in enumerate(label_list)}
51
 
52
- tokenizer = LayoutLMv3TokenizerFast.from_pretrained("mp-02/layoutlmv3-finetuned-cord_100", apply_ocr=False)
53
- processor = LayoutLMv3Processor.from_pretrained("mp-02/layoutlmv3-finetuned-cord_100", apply_ocr=False)
54
- model = LayoutLMv3ForTokenClassification.from_pretrained("mp-02/layoutlmv3-finetuned-cord_100")
55
 
56
  device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
57
  model.to(device)
 
49
  id2label = dict(enumerate(label_list))
50
  label2id = {v: k for k, v in enumerate(label_list)}
51
 
52
+ tokenizer = LayoutLMv3TokenizerFast.from_pretrained("mp-02/layoutlmv3-finetuned-cord", apply_ocr=False)
53
+ processor = LayoutLMv3Processor.from_pretrained("mp-02/layoutlmv3-finetuned-cord", apply_ocr=False)
54
+ model = LayoutLMv3ForTokenClassification.from_pretrained("mp-02/layoutlmv3-finetuned-cord")
55
 
56
  device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
57
  model.to(device)