nppmatt commited on
Commit
5a5a226
1 Parent(s): ec300ee

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -27,7 +27,7 @@ class BertClass(torch.nn.Module):
27
  bert_path = "bert-base-uncased"
28
  bert_tokenizer = AutoTokenizer.from_pretrained(bert_path)
29
  bert_model = BertForSequenceClassification.from_pretrained(bert_path, num_labels=6)
30
- tuned_model = model = torch.load("pytorch_bert_toxic.bin")
31
 
32
  # Read and format data.
33
  tweets_raw = pd.read_csv("test.csv", nrows=20)
 
27
  bert_path = "bert-base-uncased"
28
  bert_tokenizer = AutoTokenizer.from_pretrained(bert_path)
29
  bert_model = BertForSequenceClassification.from_pretrained(bert_path, num_labels=6)
30
+ tuned_model = model = torch.load("pytorch_bert_toxic.bin", map_location=torch.device("cpu"))
31
 
32
  # Read and format data.
33
  tweets_raw = pd.read_csv("test.csv", nrows=20)