hplisiecki commited on
Commit
6d6039f
1 Parent(s): da18575

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -41,12 +41,12 @@ Proceed as follows:
41
 
42
  ```python
43
  from word2affect_polish.model_script import CustomModel # importing the custom model class
44
- from transformers import PreTrainedTokenizerFast
45
 
46
  model_directory = "word2affect_english" # path to the cloned repository
47
 
48
  model = CustomModel.from_pretrained(model_directory)
49
- tokenizer = PreTrainedTokenizerFast.from_pretrained(model_directory)
50
 
51
  inputs = tokenizer("This is a test input.", return_tensors="pt")
52
  outputs = model(inputs['input_ids'], inputs['attention_mask'])
 
41
 
42
  ```python
43
  from word2affect_polish.model_script import CustomModel # importing the custom model class
44
+ from transformers import AutoTokenizer
45
 
46
  model_directory = "word2affect_english" # path to the cloned repository
47
 
48
  model = CustomModel.from_pretrained(model_directory)
49
+ tokenizer = AutoTokenizer.from_pretrained(model_directory)
50
 
51
  inputs = tokenizer("This is a test input.", return_tensors="pt")
52
  outputs = model(inputs['input_ids'], inputs['attention_mask'])