Spaces:
Running
on
T4
Running
on
T4
Update app.py
Browse files
app.py
CHANGED
@@ -427,7 +427,7 @@ def get_beam_search_html(
|
|
427 |
length_penalty=-3.0,
|
428 |
num_return_sequences=3
|
429 |
):
|
430 |
-
input_with_template=f"<|im_start|>{input_text}"
|
431 |
|
432 |
inputs = tokenizer([input_with_template], return_tensors="pt")
|
433 |
|
@@ -491,7 +491,7 @@ with gr.Blocks(
|
|
491 |
n_beams=1
|
492 |
length_penalty=1
|
493 |
num_return_sequences=3
|
494 |
-
button = gr.Button()
|
495 |
out_html = gr.Markdown()
|
496 |
out_markdown = gr.Markdown()
|
497 |
button.click(
|
|
|
427 |
length_penalty=-3.0,
|
428 |
num_return_sequences=3
|
429 |
):
|
430 |
+
input_with_template=f"<|im_start|>system /n You are a helpful chatbot.<|im_end|><|im_start|>{input_text}"
|
431 |
|
432 |
inputs = tokenizer([input_with_template], return_tensors="pt")
|
433 |
|
|
|
491 |
n_beams=1
|
492 |
length_penalty=1
|
493 |
num_return_sequences=3
|
494 |
+
button = gr.Button("Decode")
|
495 |
out_html = gr.Markdown()
|
496 |
out_markdown = gr.Markdown()
|
497 |
button.click(
|