Update README.md
Browse files
README.md
CHANGED
@@ -26,9 +26,9 @@ set a seed for reproducibility:
|
|
26 |
```
|
27 |
Here is how to use this model to get the features of a given text in PyTorch:
|
28 |
```python
|
29 |
-
from transformers import AutoTokenizer, AutoModelWithLMHead
|
30 |
-
tokenizer = AutoTokenizer.from_pretrained("Tanhim/gpt2-model-de")
|
31 |
-
model = AutoModelWithLMHead.from_pretrained("Tanhim/gpt2-model-de")
|
32 |
text = "Ersetzen Sie mich durch einen beliebigen Text, den Sie wünschen."
|
33 |
encoded_input = tokenizer(text, return_tensors='pt')
|
34 |
output = model(**encoded_input)
|
|
|
26 |
```
|
27 |
Here is how to use this model to get the features of a given text in PyTorch:
|
28 |
```python
|
29 |
+
from transformers import AutoTokenizer, AutoModelWithLMHead
|
30 |
+
tokenizer = AutoTokenizer.from_pretrained("Tanhim/gpt2-model-de")
|
31 |
+
model = AutoModelWithLMHead.from_pretrained("Tanhim/gpt2-model-de")
|
32 |
text = "Ersetzen Sie mich durch einen beliebigen Text, den Sie wünschen."
|
33 |
encoded_input = tokenizer(text, return_tensors='pt')
|
34 |
output = model(**encoded_input)
|