Spaces:
Sleeping
Sleeping
Update paraphraser.py
Browse files- paraphraser.py +1 -1
paraphraser.py
CHANGED
@@ -34,7 +34,7 @@ def paraphrase_comment(comment):
|
|
34 |
# Generate the paraphrased comment with optimized parameters
|
35 |
outputs = model.generate(
|
36 |
**inputs,
|
37 |
-
|
38 |
num_beams=4, # Use beam search for faster and more consistent generation
|
39 |
early_stopping=True, # Stop generation once a good sequence is found
|
40 |
do_sample=False # Disable sampling to use beam search
|
|
|
34 |
# Generate the paraphrased comment with optimized parameters
|
35 |
outputs = model.generate(
|
36 |
**inputs,
|
37 |
+
max_new_tokens=50, # Specify the number of new tokens to generate (excludes input length)
|
38 |
num_beams=4, # Use beam search for faster and more consistent generation
|
39 |
early_stopping=True, # Stop generation once a good sequence is found
|
40 |
do_sample=False # Disable sampling to use beam search
|