btrunghieu commited on
Commit
f4f8b42
1 Parent(s): a6cb698

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -178,6 +178,7 @@ device = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu')
178
  model = SentimentClassifier(n_classes=3)
179
  model.to(device)
180
  model.load_state_dict(torch.load('phobert_fold1.pth', map_location=torch.device('cpu')))
 
181
 
182
  class_names = ['CLEAN', 'OFFENSIVE', 'HATE']
183
 
 
178
  model = SentimentClassifier(n_classes=3)
179
  model.to(device)
180
  model.load_state_dict(torch.load('phobert_fold1.pth', map_location=torch.device('cpu')))
181
+ tokenizer = AutoTokenizer.from_pretrained("vinai/phobert-base")
182
 
183
  class_names = ['CLEAN', 'OFFENSIVE', 'HATE']
184