hplisiecki
commited on
Commit
•
6d6039f
1
Parent(s):
da18575
Update README.md
Browse files
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
|
45 |
|
46 |
model_directory = "word2affect_english" # path to the cloned repository
|
47 |
|
48 |
model = CustomModel.from_pretrained(model_directory)
|
49 |
-
tokenizer =
|
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'])
|