Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -3,8 +3,8 @@ from transformers import GPT2LMHeadModel, GPT2Tokenizer
|
|
3 |
import torch
|
4 |
|
5 |
# Initialisierung des Modells und des Tokenizers
|
6 |
-
tokenizer = GPT2Tokenizer.from_pretrained("Loewolf/L-GPT_1")
|
7 |
-
model = GPT2LMHeadModel.from_pretrained("Loewolf/L-GPT_1")
|
8 |
|
9 |
def generate_text(prompt):
|
10 |
input_ids = tokenizer.encode(prompt, return_tensors="pt")
|
|
|
3 |
import torch
|
4 |
|
5 |
# Initialisierung des Modells und des Tokenizers
|
6 |
+
tokenizer = GPT2Tokenizer.from_pretrained("Loewolf/L-GPT_1.1")
|
7 |
+
model = GPT2LMHeadModel.from_pretrained("Loewolf/L-GPT_1.1")
|
8 |
|
9 |
def generate_text(prompt):
|
10 |
input_ids = tokenizer.encode(prompt, return_tensors="pt")
|