ThomasBlumet
commited on
Commit
·
a20783b
1
Parent(s):
5a33e76
change model
Browse files
app.py
CHANGED
@@ -16,10 +16,6 @@ logger = logging.get_logger("transformers")
|
|
16 |
#model.to("cuda")
|
17 |
tokenizer = GPT2Tokenizer.from_pretrained('gpt2')
|
18 |
model = GPT2Model.from_pretrained('gpt2')
|
19 |
-
text = "Replace me by any text you'd like."
|
20 |
-
encoded_input = tokenizer(text, return_tensors='pt')
|
21 |
-
output = model(**encoded_input)
|
22 |
-
|
23 |
|
24 |
# Generate text using the model and tokenizer
|
25 |
#@spaces.GPU(duration=60)
|
|
|
16 |
#model.to("cuda")
|
17 |
tokenizer = GPT2Tokenizer.from_pretrained('gpt2')
|
18 |
model = GPT2Model.from_pretrained('gpt2')
|
|
|
|
|
|
|
|
|
19 |
|
20 |
# Generate text using the model and tokenizer
|
21 |
#@spaces.GPU(duration=60)
|