Update README.md
Browse files
README.md
CHANGED
@@ -26,7 +26,7 @@ model = PegasusForConditionalGeneration.from_pretrained(model_name).to(torch_dev
|
|
26 |
|
27 |
def get_response(input_text):
|
28 |
batch = tokenizer([input_text],truncation=True,padding='longest',max_length=1024, return_tensors="pt").to(torch_device)
|
29 |
-
gen_out = model.generate(**batch,max_length=128,num_beams=
|
30 |
output_text = tokenizer.batch_decode(gen_out, skip_special_tokens=True)
|
31 |
return output_text
|
32 |
```
|
|
|
26 |
|
27 |
def get_response(input_text):
|
28 |
batch = tokenizer([input_text],truncation=True,padding='longest',max_length=1024, return_tensors="pt").to(torch_device)
|
29 |
+
gen_out = model.generate(**batch,max_length=128,num_beams=5, num_return_sequences=1, temperature=1.5)
|
30 |
output_text = tokenizer.batch_decode(gen_out, skip_special_tokens=True)
|
31 |
return output_text
|
32 |
```
|