FlipFlopsNSocks commited on
Commit
65ba138
1 Parent(s): ae6d5b1
Files changed (1) hide show
  1. README.md +7 -0
README.md CHANGED
@@ -9,3 +9,10 @@ license: apache-2.0
9
  ---
10
 
11
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
9
  ---
10
 
11
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
12
+ from transformers import GPT2Tokenizer, GPT2Model
13
+ tokenizer = GPT2Tokenizer.from_pretrained('gpt2-xl')
14
+ model = GPT2Model.from_pretrained('gpt2-xl')
15
+ text = "Replace me by any text you'd like."
16
+ encoded_input = tokenizer(text, return_tensors='pt')
17
+ output = model(**encoded_input)
18
+