Spaces:
Runtime error
Runtime error
Commit
•
340cd2c
1
Parent(s):
9070911
Update support.py
Browse files- support.py +2 -2
support.py
CHANGED
@@ -7,9 +7,9 @@ import torch
|
|
7 |
|
8 |
tokenizer = LayoutLMv3Processor.from_pretrained("microsoft/layoutlmv3-base")
|
9 |
model = LayoutLMv3ForTokenClassification.from_pretrained(r"models")
|
10 |
-
device = torch.device("cuda")
|
11 |
model.cuda()
|
12 |
-
|
13 |
labels = ['O', 'B-HEADER', 'I-HEADER', 'B-QUESTION', 'I-QUESTION', 'B-ANSWER', 'I-ANSWER']
|
14 |
id2label = {v: k for v, k in enumerate(labels)}
|
15 |
label2color = {
|
|
|
7 |
|
8 |
tokenizer = LayoutLMv3Processor.from_pretrained("microsoft/layoutlmv3-base")
|
9 |
model = LayoutLMv3ForTokenClassification.from_pretrained(r"models")
|
10 |
+
"""device = torch.device("cuda")
|
11 |
model.cuda()
|
12 |
+
"""
|
13 |
labels = ['O', 'B-HEADER', 'I-HEADER', 'B-QUESTION', 'I-QUESTION', 'B-ANSWER', 'I-ANSWER']
|
14 |
id2label = {v: k for v, k in enumerate(labels)}
|
15 |
label2color = {
|