Update app.py
Browse files
app.py
CHANGED
|
@@ -19,7 +19,7 @@ model = BertForSequenceClassification(config)
|
|
| 19 |
# model.load_state_dict(torch.load(os.path.join(bert_out_address, "pytorch_model.bin")))
|
| 20 |
|
| 21 |
model.load_state_dict(torch.load(os.path.join(bert_out_address, "pytorch_model.bin"), map_location=torch.device(device)))
|
| 22 |
-
model = BertForTokenClassification.from_pretrained(bert_out_address,num_labels=
|
| 23 |
|
| 24 |
# Load the tokenizer
|
| 25 |
tokenizer = BertTokenizer.from_pretrained(bert_out_address)
|
|
|
|
| 19 |
# model.load_state_dict(torch.load(os.path.join(bert_out_address, "pytorch_model.bin")))
|
| 20 |
|
| 21 |
model.load_state_dict(torch.load(os.path.join(bert_out_address, "pytorch_model.bin"), map_location=torch.device(device)))
|
| 22 |
+
model = BertForTokenClassification.from_pretrained(bert_out_address,num_labels=5)
|
| 23 |
|
| 24 |
# Load the tokenizer
|
| 25 |
tokenizer = BertTokenizer.from_pretrained(bert_out_address)
|