Commit
•
37abb7c
1
Parent(s):
6117df9
Update README.md
Browse files
README.md
CHANGED
@@ -28,7 +28,7 @@ tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME)
|
|
28 |
model.to(device)
|
29 |
my_text = ""
|
30 |
inputs = tokenizer(my_text, return_tensors="pt").to(device)
|
31 |
-
outputs =
|
32 |
attention_mask=inputs['attention_mask'],
|
33 |
num_beams=2, max_length=1050, top_k=10)
|
34 |
clean_text = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
|
|
28 |
model.to(device)
|
29 |
my_text = ""
|
30 |
inputs = tokenizer(my_text, return_tensors="pt").to(device)
|
31 |
+
outputs = model.generate(input_ids=inputs['input_ids'],
|
32 |
attention_mask=inputs['attention_mask'],
|
33 |
num_beams=2, max_length=1050, top_k=10)
|
34 |
clean_text = tokenizer.decode(outputs[0], skip_special_tokens=True)
|