Spaces:
No application file
No application file
FlipFlopsNSocks
commited on
Commit
•
65ba138
1
Parent(s):
ae6d5b1
UpdatedReadme (#1)
Browse files- UpdatedReadme (fda9c804fa353f2175d180a318bd764cccccd909)
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 |
+
|