HMPhuoc commited on
Commit
e6c86bb
1 Parent(s): 2205ed4

remove AutoModel

Browse files
Files changed (1) hide show
  1. 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"))