PenguinMan commited on
Commit
a2b4655
·
1 Parent(s): 36effc7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -32,7 +32,8 @@ class SentimentClassifier(nn.Module):
32
  model = SentimentClassifier(len(class_names))
33
 
34
 
35
- model2 = pickle.load(open("model_BERT_2", "rb"))
 
36
  def result_final(new_article):
37
 
38
  encoded_review = tokenizer.encode_plus(
 
32
  model = SentimentClassifier(len(class_names))
33
 
34
 
35
+ device = torch.device('cpu')
36
+ model2 = torch.load("model_BERT_2", map_location=device)
37
  def result_final(new_article):
38
 
39
  encoded_review = tokenizer.encode_plus(