Spaces:
Paused
Paused
NGUYEN, Xuan Phi
commited on
Commit
·
93038e2
1
Parent(s):
c69f128
update
Browse files
multipurpose_chatbot/demos/text_completion.py
CHANGED
|
@@ -163,13 +163,14 @@ class TextCompletionDemo(BaseDemo):
|
|
| 163 |
with gr.Row():
|
| 164 |
temp_input = gr.Number(value=temperature, label='Temperature', info="Higher -> more random")
|
| 165 |
length_input = gr.Number(value=max_tokens, label='Max tokens', info='Increase if want more generation')
|
| 166 |
-
stop_strings = gr.Textbox(value="<s>,</s>,<|im_start|>,<|im_end|>", label='Stop strings', info='Comma-separated string to stop generation only in FEW-SHOT mode', lines=1)
|
| 167 |
examples = gr.Examples(
|
| 168 |
examples=[
|
| 169 |
["The following is the recite the declaration of independence:",]
|
| 170 |
],
|
| 171 |
inputs=[txt, temp_input, length_input, stop_strings],
|
| 172 |
# outputs=[txt]
|
|
|
|
| 173 |
)
|
| 174 |
# ! Handle stop button
|
| 175 |
submit_trigger = submit_button.click
|
|
|
|
| 163 |
with gr.Row():
|
| 164 |
temp_input = gr.Number(value=temperature, label='Temperature', info="Higher -> more random")
|
| 165 |
length_input = gr.Number(value=max_tokens, label='Max tokens', info='Increase if want more generation')
|
| 166 |
+
stop_strings = gr.Textbox(value="<eos>,<s>,</s>,<|im_start|>,<|im_end|>", label='Stop strings', info='Comma-separated string to stop generation only in FEW-SHOT mode', lines=1)
|
| 167 |
examples = gr.Examples(
|
| 168 |
examples=[
|
| 169 |
["The following is the recite the declaration of independence:",]
|
| 170 |
],
|
| 171 |
inputs=[txt, temp_input, length_input, stop_strings],
|
| 172 |
# outputs=[txt]
|
| 173 |
+
cache_examples=False,
|
| 174 |
)
|
| 175 |
# ! Handle stop button
|
| 176 |
submit_trigger = submit_button.click
|