Shaltiel commited on
Commit
91e3018
โ€ข
1 Parent(s): 356be77

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +1 -0
README.md CHANGED
@@ -23,6 +23,7 @@ sentence = 'ื‘ืฉื ืช 1948 ื”ืฉืœื™ื ืืคืจื™ื ืงื™ืฉื•ืŸ ืืช [MASK] ื‘ืคื™ืก
23
 
24
  output = model(tokenizer.encode(sentence, return_tensors='pt'))
25
  # the [MASK] is the 7th token (including [CLS])
 
26
  top_2 = torch.topk(output.logits[0, 7, :], 2)[1]
27
  print('\n'.join(tokenizer.convert_ids_to_tokens(top_2))) # should print ืœื™ืžื•ื“ื™ื• / ื”ืชืžื—ื•ืชื•
28
 
 
23
 
24
  output = model(tokenizer.encode(sentence, return_tensors='pt'))
25
  # the [MASK] is the 7th token (including [CLS])
26
+ import torch
27
  top_2 = torch.topk(output.logits[0, 7, :], 2)[1]
28
  print('\n'.join(tokenizer.convert_ids_to_tokens(top_2))) # should print ืœื™ืžื•ื“ื™ื• / ื”ืชืžื—ื•ืชื•
29