Spaces:
Running
Running
remove AutoModel
Browse files- phoBERT.py +2 -1
phoBERT.py
CHANGED
@@ -2,7 +2,7 @@ import torch
|
|
2 |
from transformers import AutoModel, AutoTokenizer
|
3 |
from underthesea import word_tokenize
|
4 |
|
5 |
-
phobert = AutoModel.from_pretrained("vinai/phobert-base")
|
6 |
tokenizer = AutoTokenizer.from_pretrained("vinai/phobert-base")
|
7 |
|
8 |
class PhoBertModel(torch.nn.Module):
|
@@ -77,3 +77,4 @@ def BERT_predict(text):
|
|
77 |
print(result)
|
78 |
return result.tolist()[0]
|
79 |
|
|
|
|
2 |
from transformers import AutoModel, AutoTokenizer
|
3 |
from underthesea import word_tokenize
|
4 |
|
5 |
+
#phobert = AutoModel.from_pretrained("vinai/phobert-base")
|
6 |
tokenizer = AutoTokenizer.from_pretrained("vinai/phobert-base")
|
7 |
|
8 |
class PhoBertModel(torch.nn.Module):
|
|
|
77 |
print(result)
|
78 |
return result.tolist()[0]
|
79 |
|
80 |
+
print(BERT_predict("xin chaof"))
|