Bui Trung commited on
Commit
acb2e4c
1 Parent(s): 0d07222

Update app.py

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