Update README.md
Browse files
README.md
CHANGED
@@ -27,7 +27,7 @@ This repository contains a BERT-based model, **medBERT-base**, fine-tuned on the
|
|
27 |
|
28 |
You can load the pre-trained **medBERT-base** model using the Hugging Face `transformers` library:
|
29 |
|
30 |
-
|
31 |
from transformers import BertTokenizer, BertForMaskedLM
|
32 |
import torch
|
33 |
|
@@ -49,7 +49,7 @@ top_k_tokens = tokenizer.convert_ids_to_tokens(top_k_ids)
|
|
49 |
print("Top 5 prediction:")
|
50 |
for i, token in enumerate(top_k_tokens):
|
51 |
print(f"{i + 1}: {token}")
|
52 |
-
|
53 |
|
54 |
_Top 5 prediction:_
|
55 |
_1: from_
|
|
|
27 |
|
28 |
You can load the pre-trained **medBERT-base** model using the Hugging Face `transformers` library:
|
29 |
|
30 |
+
```py
|
31 |
from transformers import BertTokenizer, BertForMaskedLM
|
32 |
import torch
|
33 |
|
|
|
49 |
print("Top 5 prediction:")
|
50 |
for i, token in enumerate(top_k_tokens):
|
51 |
print(f"{i + 1}: {token}")
|
52 |
+
```
|
53 |
|
54 |
_Top 5 prediction:_
|
55 |
_1: from_
|