mfajcik commited on
Commit
3babd85
1 Parent(s): 94ed3e9

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +3 -3
README.md CHANGED
@@ -50,14 +50,14 @@ Not mentioned parameters are the same as for GPT-2.
50
 
51
  ## Usage
52
  ```python
53
- from transformers import AutoTokenizer, GPT2LMHeadModel
54
  import torch
55
 
56
  t = AutoTokenizer.from_pretrained("BUT-FIT/Czech-GPT-2-XL-133k")
57
- m = GPT2LMHeadModel.from_pretrained("BUT-FIT/Czech-GPT-2-XL-133k").eval()
58
 
59
  # Try the model inference
60
- prompt = "Najznámějším českým spisovatelem "
61
  input_ids = t.encode(prompt, return_tensors="pt")
62
  with torch.no_grad():
63
  generated_text = m.generate(input_ids=input_ids,
 
50
 
51
  ## Usage
52
  ```python
53
+ from transformers import AutoTokenizer, AutoModelForCausalLM
54
  import torch
55
 
56
  t = AutoTokenizer.from_pretrained("BUT-FIT/Czech-GPT-2-XL-133k")
57
+ m = AutoModelForCausalLM.from_pretrained("BUT-FIT/Czech-GPT-2-XL-133k").eval()
58
 
59
  # Try the model inference
60
+ prompt = "Nejznámějším českým spisovatelem "
61
  input_ids = t.encode(prompt, return_tensors="pt")
62
  with torch.no_grad():
63
  generated_text = m.generate(input_ids=input_ids,