Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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):
|