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