hplisiecki
commited on
Commit
•
782d61f
1
Parent(s):
45ed372
Update README.md
Browse files
README.md
CHANGED
@@ -39,12 +39,12 @@ Proceed as follows:
|
|
39 |
|
40 |
```python
|
41 |
from word2affect_spanish.model_script import CustomModel # importing the custom model class
|
42 |
-
from transformers import
|
43 |
|
44 |
model_directory = "word2affect_spanish" # path to the cloned repository
|
45 |
|
46 |
model = CustomModel.from_pretrained(model_directory)
|
47 |
-
tokenizer =
|
48 |
|
49 |
inputs = tokenizer("This is a test input.", return_tensors="pt")
|
50 |
outputs = model(inputs['input_ids'], inputs['attention_mask'])
|
|
|
39 |
|
40 |
```python
|
41 |
from word2affect_spanish.model_script import CustomModel # importing the custom model class
|
42 |
+
from transformers import BertTokenizer
|
43 |
|
44 |
model_directory = "word2affect_spanish" # path to the cloned repository
|
45 |
|
46 |
model = CustomModel.from_pretrained(model_directory)
|
47 |
+
tokenizer = BertTokenizer.from_pretrained(model_directory)
|
48 |
|
49 |
inputs = tokenizer("This is a test input.", return_tensors="pt")
|
50 |
outputs = model(inputs['input_ids'], inputs['attention_mask'])
|