Commit
·
d345be1
1
Parent(s):
1801d17
Update app.py
Browse files
app.py
CHANGED
@@ -42,11 +42,10 @@ from transformers import AutoTokenizer, AutoModelForTokenClassification
|
|
42 |
import torch
|
43 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
44 |
|
45 |
-
model_id = "pierreguillou/lilt-xlm-roberta-base-finetuned-DocLayNet-base_paragraphs_ml512
|
46 |
|
47 |
-
|
48 |
-
|
49 |
-
model = AutoModelForTokenClassification.from_pretrained(model_id, use_auth_token=API_TOKEN);
|
50 |
model.to(device);
|
51 |
|
52 |
# APP outputs
|
|
|
42 |
import torch
|
43 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
44 |
|
45 |
+
model_id = "pierreguillou/lilt-xlm-roberta-base-finetuned-DocLayNet-base_paragraphs_ml512"
|
46 |
|
47 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
48 |
+
model = AutoModelForTokenClassification.from_pretrained(model_id);
|
|
|
49 |
model.to(device);
|
50 |
|
51 |
# APP outputs
|