Spaces:
Sleeping
Sleeping
VampeeHuntee
commited on
Commit
•
4ab91be
1
Parent(s):
f3cd1eb
update
Browse files- modules/model.py +2 -2
modules/model.py
CHANGED
@@ -2,8 +2,8 @@ import torch
|
|
2 |
from transformers import AutoTokenizer, AutoModelForTokenClassification
|
3 |
from seqeval.metrics.sequence_labeling import get_entities
|
4 |
|
5 |
-
tokenizer = AutoTokenizer.from_pretrained("
|
6 |
-
model = AutoModelForTokenClassification.from_pretrained("
|
7 |
|
8 |
def get_words(tokens:list[str]):
|
9 |
return tokenizer.convert_tokens_to_string(tokens)
|
|
|
2 |
from transformers import AutoTokenizer, AutoModelForTokenClassification
|
3 |
from seqeval.metrics.sequence_labeling import get_entities
|
4 |
|
5 |
+
tokenizer = AutoTokenizer.from_pretrained("./model", use_fast = False)
|
6 |
+
model = AutoModelForTokenClassification.from_pretrained("./model")
|
7 |
|
8 |
def get_words(tokens:list[str]):
|
9 |
return tokenizer.convert_tokens_to_string(tokens)
|