arm-on commited on
Commit
b1a8188
1 Parent(s): 0508099

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +3 -1
README.md CHANGED
@@ -23,9 +23,11 @@ How to use the Model
23
  ---
24
  ```
25
  import torch
26
- from transformers import BertForMaskedLM, BertTokenizer
27
  model = BertForMaskedLM.from_pretrained('arm-on/BERTweet-FA')
28
  tokenizer = BertTokenizer.from_pretrained('arm-on/BERTweet-FA')
 
 
29
  ```
30
 
31
  The Training Data
 
23
  ---
24
  ```
25
  import torch
26
+ from transformers import BertForMaskedLM, BertTokenizer, pipeline
27
  model = BertForMaskedLM.from_pretrained('arm-on/BERTweet-FA')
28
  tokenizer = BertTokenizer.from_pretrained('arm-on/BERTweet-FA')
29
+ fill_sentence = pipeline('fill-mask', model=model, tokenizer=tokenizer)
30
+ fill_sentence('اینجا جمله مورد نظر خود را بنویسید و کلمه موردنظر را [MASK] کنید')
31
  ```
32
 
33
  The Training Data