celex commited on
Commit
f7d1a69
1 Parent(s): 32254a3

Update Getting Started code as previous version doesn't work anymore

Browse files
Files changed (1) hide show
  1. README.md +3 -3
README.md CHANGED
@@ -24,10 +24,10 @@ Preprocessing, training and implementation details can be found in the [personaG
24
  ```python
25
  from transformers import GPT2Tokenizer, GPT2LMHeadModel
26
  import torch
27
- tokenizer = AutoTokenizer.from_pretrained("af1tang/personaGPT")
28
- model = AutoModelForCausalLM.from_pretrained("af1tang/personaGPT")
29
  if torch.cuda.is_available():
30
- model = model.cuda()
31
  ## utility functions ##
32
  flatten = lambda l: [item for sublist in l for item in sublist]
33
 
 
24
  ```python
25
  from transformers import GPT2Tokenizer, GPT2LMHeadModel
26
  import torch
27
+ tokenizer = GPT2Tokenizer.from_pretrained("af1tang/personaGPT")
28
+ model = GPT2LMHeadModel.from_pretrained("af1tang/personaGPT")
29
  if torch.cuda.is_available():
30
+ model = model.cuda()
31
  ## utility functions ##
32
  flatten = lambda l: [item for sublist in l for item in sublist]
33