Spaces:
No application file
No application file
title: ConstructorofMaterials | |
emoji: 💩 | |
colorFrom: green | |
colorTo: red | |
sdk: docker | |
pinned: false | |
license: apache-2.0 | |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference | |
from transformers import GPT2Tokenizer, GPT2Model | |
tokenizer = GPT2Tokenizer.from_pretrained('gpt2-xl') | |
model = GPT2Model.from_pretrained('gpt2-xl') | |
text = "Replace me by any text you'd like." | |
encoded_input = tokenizer(text, return_tensors='pt') | |
output = model(**encoded_input) | |