Commit
•
ba2da2d
1
Parent(s):
69bcbf3
Update README.md
Browse files
README.md
CHANGED
@@ -28,6 +28,10 @@ import torch
|
|
28 |
|
29 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
30 |
print(device)
|
|
|
|
|
|
|
|
|
31 |
|
32 |
def generate_output(text):
|
33 |
# Input text for completion
|
|
|
28 |
|
29 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
30 |
print(device)
|
31 |
+
|
32 |
+
model = GPT2LMHeadModel.from_pretrained("erythropygia/gpt2-base-turkish").to(device)
|
33 |
+
tokenizer = GPT2TokenizerFast.from_pretrained("erythropygia/gpt2-base-turkish")
|
34 |
+
tokenizer.pad_token = tokenizer.eos_token
|
35 |
|
36 |
def generate_output(text):
|
37 |
# Input text for completion
|