SaranaAbidueva
commited on
Commit
·
48d4e07
1
Parent(s):
2cf4c23
Update README.md
Browse files
README.md
CHANGED
@@ -25,8 +25,7 @@ def translate(text, max_length=200, num_beams=5, repetition_penalty=5.0, **kwarg
|
|
25 |
**encoded.to(model.device),
|
26 |
max_length=max_length,
|
27 |
num_beams=num_beams,
|
28 |
-
repetition_penalty=repetition_penalty
|
29 |
-
# early_stopping=True,
|
30 |
)
|
31 |
return tokenizer.batch_decode(generated_tokens, skip_special_tokens=True)[0]
|
32 |
|
|
|
25 |
**encoded.to(model.device),
|
26 |
max_length=max_length,
|
27 |
num_beams=num_beams,
|
28 |
+
repetition_penalty=repetition_penalty
|
|
|
29 |
)
|
30 |
return tokenizer.batch_decode(generated_tokens, skip_special_tokens=True)[0]
|
31 |
|