Spaces:
Running
Running
Update sroie_inference.py
Browse files- sroie_inference.py +2 -2
sroie_inference.py
CHANGED
@@ -5,8 +5,8 @@ from PIL import Image, ImageDraw, ImageFont
|
|
5 |
from transformers import LayoutLMv3TokenizerFast, LayoutLMv3Processor, LayoutLMv3ForTokenClassification
|
6 |
from utils import OCR, unnormalize_box
|
7 |
|
8 |
-
# [
|
9 |
-
labels = ["
|
10 |
id2label = {v: k for v, k in enumerate(labels)}
|
11 |
label2id = {k: v for v, k in enumerate(labels)}
|
12 |
|
|
|
5 |
from transformers import LayoutLMv3TokenizerFast, LayoutLMv3Processor, LayoutLMv3ForTokenClassification
|
6 |
from utils import OCR, unnormalize_box
|
7 |
|
8 |
+
# [B-COMPANY", "I-COMPANY", "B-DATE", "I-DATE", "B-ADDRESS", "I-ADDRESS", "B-TOTAL", "I-TOTAL", "O"]
|
9 |
+
labels = ["COMPANY", "COMPANY", "DATE", "DATE", "ADDRESS", "ADDRESS", "TOTAL", "TOTAL", "O"]
|
10 |
id2label = {v: k for v, k in enumerate(labels)}
|
11 |
label2id = {k: v for v, k in enumerate(labels)}
|
12 |
|