GiliGold commited on
Commit
fe37b82
verified
1 Parent(s): bab5c9e

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +3 -4
README.md CHANGED
@@ -46,20 +46,19 @@ model = AutoModelForMaskedLM.from_pretrained("GiliGold/Knesset-DictaBERT")
46
 
47
  model.eval()
48
 
49
- sentence = "讛讻谞住转 讛讬讗 讛专砖讜转 [MASK] 砖诇 诪讚讬谞转 讬砖专讗诇."
50
 
51
  # Tokenize the input sentence and get predictions
52
  inputs = tokenizer.encode(sentence, return_tensors='pt')
53
  output = model(inputs)
54
 
55
- # The [MASK] token is the 5th token in the sentence (including [CLS])
56
- mask_token_index = 5
57
  top_2_tokens = torch.topk(output.logits[0, mask_token_index, :], 2)[1]
58
 
59
  # Convert token IDs to tokens and print them
60
  print('\n'.join(tokenizer.convert_ids_to_tokens(top_2_tokens)))
61
 
62
- # Example output: 讛诪讘爪注转 / 讛诪讞讜拽拽转
63
 
64
  ```
65
 
 
46
 
47
  model.eval()
48
 
49
+ sentence = "讬砖 诇谞讜 [MASK] 注诇 讝讛 讘砖讘讜注 讛讘讗"
50
 
51
  # Tokenize the input sentence and get predictions
52
  inputs = tokenizer.encode(sentence, return_tensors='pt')
53
  output = model(inputs)
54
 
55
+ mask_token_index = 3
 
56
  top_2_tokens = torch.topk(output.logits[0, mask_token_index, :], 2)[1]
57
 
58
  # Convert token IDs to tokens and print them
59
  print('\n'.join(tokenizer.convert_ids_to_tokens(top_2_tokens)))
60
 
61
+ # Example output: 讬砖讬讘讛 / 讚讬讜谉
62
 
63
  ```
64