Views
No views yet

Spanish Biomedical Crawled Corpus - 90% for training / 10% for validation.| Metric | # Value |
|---|---|
| Accuracy | 0.802 |
| Loss | 1.04 |
transformers1from transformers import BartForConditionalGeneration, BartTokenizer
2
3model_id = "Narrativa/NarbioBART"
4
5model = BartForConditionalGeneration.from_pretrained(model_id, forced_bos_token_id=0)
6tokenizer = BartTokenizer.from_pretrained(model_id)
7
8def fill_mask_span(text):
9 batch = tokenizer(text, return_tensors="pt")
10 generated_ids = model.generate(batch["input_ids"])
11 print(tokenizer.batch_decode(generated_ids, skip_special_tokens=True))
12
13text = "your text with a <mask> token."
14fill_mask_span(text)@misc {narrativa_2023,
author = { {Narrativa} },
title = { NarbioBART (Revision c9a4e07) },
year = 2023,
url = { https://huggingface.co/Narrativa/NarbioBART },
doi = { 10.57967/hf/0500 },
publisher = { Hugging Face }
}