Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,10 +1,9 @@
|
|
1 |
import transformers
|
2 |
-
from transformers import
|
3 |
model_id = "gpt2"
|
4 |
|
5 |
-
model =
|
6 |
|
7 |
text = "Hello"
|
8 |
|
9 |
-
outputs = model(
|
10 |
-
print(outputs)
|
|
|
1 |
import transformers
|
2 |
+
from transformers import GPT2LMHeadModel
|
3 |
model_id = "gpt2"
|
4 |
|
5 |
+
model = GPT2LMHeadModel.from_pretrained(model_id)
|
6 |
|
7 |
text = "Hello"
|
8 |
|
9 |
+
outputs = model(encoded_text)
|
|