Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -100,6 +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 |
|
104 |
return turna(input, max_new_tokens = max_new_tokens, length_penalty=length_penalty,
|
105 |
top_k=top_k, top_p=top_p, temperature=temp, num_beams=num_beams,
|
@@ -151,7 +152,7 @@ with gr.Blocks(theme="abidlabs/Lime") as demo:
|
|
151 |
text_gen_submit.click(turna, inputs=[text_gen_input, max_new_tokens, length_penalty,
|
152 |
top_k, top_p, temp, num_beams,
|
153 |
do_sample, no_repeat_ngram_size, repetition_penalty], outputs=text_gen_output)
|
154 |
-
text_gen_example = [["
|
155 |
text_gen_examples = gr.Examples(examples = text_gen_example, inputs = [text_gen_input, max_new_tokens, length_penalty,
|
156 |
top_k, top_p, temp, num_beams, do_sample, no_repeat_ngram_size, repetition_penalty], outputs=text_gen_output, fn=turna)
|
157 |
|
|
|
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,
|
|
|
152 |
text_gen_submit.click(turna, inputs=[text_gen_input, max_new_tokens, length_penalty,
|
153 |
top_k, top_p, temp, num_beams,
|
154 |
do_sample, no_repeat_ngram_size, repetition_penalty], outputs=text_gen_output)
|
155 |
+
text_gen_example = [["Bir varmış, bir yokmuş, evvel zaman içinde, kalbur saman içinde, uzak diyarların birinde bir turna"]]
|
156 |
text_gen_examples = gr.Examples(examples = text_gen_example, inputs = [text_gen_input, max_new_tokens, length_penalty,
|
157 |
top_k, top_p, temp, num_beams, do_sample, no_repeat_ngram_size, repetition_penalty], outputs=text_gen_output, fn=turna)
|
158 |
|