Spaces:
Running
Running
Fix EOS token in turna generation
Browse files
app.py
CHANGED
@@ -100,7 +100,7 @@ def turna(input, max_new_tokens, length_penalty,
|
|
100 |
top_k, top_p, temp, num_beams,
|
101 |
do_sample, no_repeat_ngram_size, repetition_penalty):
|
102 |
turna = pipeline(model="boun-tabi-LMG/TURNA", device=0)
|
103 |
-
input = f"[S2S] {input}
|
104 |
|
105 |
return turna(input, max_new_tokens = max_new_tokens, length_penalty=length_penalty,
|
106 |
top_k=top_k, top_p=top_p, temperature=temp, num_beams=num_beams,
|
|
|
100 |
top_k, top_p, temp, num_beams,
|
101 |
do_sample, no_repeat_ngram_size, repetition_penalty):
|
102 |
turna = pipeline(model="boun-tabi-LMG/TURNA", device=0)
|
103 |
+
input = f"[S2S] {input}<EOS>"
|
104 |
|
105 |
return turna(input, max_new_tokens = max_new_tokens, length_penalty=length_penalty,
|
106 |
top_k=top_k, top_p=top_p, temperature=temp, num_beams=num_beams,
|