mirror of
https://github.com/huggingface/transformers.git
synced 2025-08-01 02:31:11 +06:00
commit
e5fe2bb5e8
@ -336,7 +336,9 @@ def main():
|
||||
output_args_file = os.path.join(args.output_dir, 'training_args.bin')
|
||||
torch.save(args, output_args_file)
|
||||
else:
|
||||
model = BertForQuestionAnswering.from_pretrained(args.bert_model)
|
||||
# Load a trained model and vocabulary that you have fine-tuned
|
||||
model = BertForQuestionAnswering.from_pretrained(args.output_dir)
|
||||
tokenizer = BertTokenizer.from_pretrained(args.output_dir, do_lower_case=args.do_lower_case)
|
||||
|
||||
model.to(device)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user