neojex commited on
Commit
af8cb67
β€’
1 Parent(s): 9704190

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -27,7 +27,7 @@ class SentimentClassifier(nn.Module):
27
  return self.out(output)
28
  # load the CNN binary classification model
29
  model = SentimentClassifier(len(class_names))
30
- model.load_state_dict(torch.load('./pytorch_model.bin'))
31
  tokenizer = BertTokenizer.from_pretrained('./')
32
 
33
  def encode(text):
 
27
  return self.out(output)
28
  # load the CNN binary classification model
29
  model = SentimentClassifier(len(class_names))
30
+ model.load_state_dict(torch.load('./pytorch_model.bin', map_location=torch.device('cpu')))
31
  tokenizer = BertTokenizer.from_pretrained('./')
32
 
33
  def encode(text):