final update
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ tokenizer = BertTokenizer.from_pretrained("dmis-lab/biobert-base-cased-v1.1")
|
|
9 |
model = BertForSequenceClassification.from_pretrained("dmis-lab/biobert-base-cased-v1.1", num_labels=2)
|
10 |
|
11 |
# loading the pretrained weights into the model
|
12 |
-
model.load_state_dict(torch.load('Bio_BERT_model.pth'))
|
13 |
|
14 |
device = "cpu"
|
15 |
|
|
|
9 |
model = BertForSequenceClassification.from_pretrained("dmis-lab/biobert-base-cased-v1.1", num_labels=2)
|
10 |
|
11 |
# loading the pretrained weights into the model
|
12 |
+
model.load_state_dict(torch.load('Bio_BERT_model.pth', map_location=torch.device('cpu')))
|
13 |
|
14 |
device = "cpu"
|
15 |
|