Update README.md
Browse files
README.md
CHANGED
@@ -43,9 +43,7 @@ import torch
|
|
43 |
|
44 |
tokenizer = AutoTokenizer.from_pretrained("GiliGold/Knesset-DictaBERT")
|
45 |
model = AutoModelForMaskedLM.from_pretrained("GiliGold/Knesset-DictaBERT")
|
46 |
-
|
47 |
model.eval()
|
48 |
-
|
49 |
sentence = "ืืฉ ืื ื [MASK] ืขื ืื ืืฉืืืข ืืื"
|
50 |
|
51 |
# Tokenize the input sentence and get predictions
|
@@ -59,7 +57,6 @@ top_2_tokens = torch.topk(output.logits[0, mask_token_index, :], 2)[1]
|
|
59 |
print('\n'.join(tokenizer.convert_ids_to_tokens(top_2_tokens)))
|
60 |
|
61 |
# Example output: ืืฉืืื / ืืืื
|
62 |
-
|
63 |
```
|
64 |
|
65 |
## Evaluation
|
|
|
43 |
|
44 |
tokenizer = AutoTokenizer.from_pretrained("GiliGold/Knesset-DictaBERT")
|
45 |
model = AutoModelForMaskedLM.from_pretrained("GiliGold/Knesset-DictaBERT")
|
|
|
46 |
model.eval()
|
|
|
47 |
sentence = "ืืฉ ืื ื [MASK] ืขื ืื ืืฉืืืข ืืื"
|
48 |
|
49 |
# Tokenize the input sentence and get predictions
|
|
|
57 |
print('\n'.join(tokenizer.convert_ids_to_tokens(top_2_tokens)))
|
58 |
|
59 |
# Example output: ืืฉืืื / ืืืื
|
|
|
60 |
```
|
61 |
|
62 |
## Evaluation
|