Update README.md
Browse files
README.md
CHANGED
@@ -10,7 +10,7 @@ import torch
|
|
10 |
|
11 |
model = AutoModelForSeq2SeqLM.from_pretrained("Chirayu/subject-generator-t5-base")
|
12 |
tokenizer = AutoTokenizer.from_pretrained("Chirayu/subject-generator-t5-base")
|
13 |
-
device = torch.device("cuda" if torch.cuda.is_available() else "
|
14 |
model = model.to(device)
|
15 |
|
16 |
def get_subject(content, num_beams=5,max_length=512, repetition_penalty=2.5, length_penalty=1, early_stopping=True,top_p=.95, top_k=50, num_return_sequences=3):
|
|
|
10 |
|
11 |
model = AutoModelForSeq2SeqLM.from_pretrained("Chirayu/subject-generator-t5-base")
|
12 |
tokenizer = AutoTokenizer.from_pretrained("Chirayu/subject-generator-t5-base")
|
13 |
+
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
14 |
model = model.to(device)
|
15 |
|
16 |
def get_subject(content, num_beams=5,max_length=512, repetition_penalty=2.5, length_penalty=1, early_stopping=True,top_p=.95, top_k=50, num_return_sequences=3):
|