Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -267,7 +267,7 @@ def http_bot(state, temperature, top_p, max_new_tokens, speaker):
|
|
267 |
if tts_format not in prompt and chat_format not in prompt:
|
268 |
state.messages[-1][-1] = output + "β"
|
269 |
else:
|
270 |
-
state.messages[-1][-1] = output + "β"
|
271 |
# state.messages[-1][-1] = "β"
|
272 |
# state.messages[-1][-1] = "[π GENERATING AUDIO {}%...]".format(round(output.count("<|speech_") / max_new_tokens * 100, 1)) + "\n" + output + "β"
|
273 |
yield (state, state.to_gradio_chatbot_public()) + (disable_btn,) * 2
|
@@ -416,7 +416,7 @@ def build_demo(embed_mode):
|
|
416 |
with gr.Accordion("Parameters", open=True) as parameter_row:
|
417 |
temperature = gr.Slider(minimum=0.0, maximum=1.0, value=0.2, step=0.1, interactive=True, label="Temperature")
|
418 |
top_p = gr.Slider(minimum=0.0, maximum=1.0, value=0.7, step=0.1, interactive=True, label="Top P")
|
419 |
-
max_output_tokens = gr.Slider(minimum=0, maximum=
|
420 |
speaker = gr.Radio(["Female", "Male"], value="Female", label="Speaker")
|
421 |
|
422 |
with gr.Column(scale=8):
|
|
|
267 |
if tts_format not in prompt and chat_format not in prompt:
|
268 |
state.messages[-1][-1] = output + "β"
|
269 |
else:
|
270 |
+
state.messages[-1][-1] = output + "β" # TODO
|
271 |
# state.messages[-1][-1] = "β"
|
272 |
# state.messages[-1][-1] = "[π GENERATING AUDIO {}%...]".format(round(output.count("<|speech_") / max_new_tokens * 100, 1)) + "\n" + output + "β"
|
273 |
yield (state, state.to_gradio_chatbot_public()) + (disable_btn,) * 2
|
|
|
416 |
with gr.Accordion("Parameters", open=True) as parameter_row:
|
417 |
temperature = gr.Slider(minimum=0.0, maximum=1.0, value=0.2, step=0.1, interactive=True, label="Temperature")
|
418 |
top_p = gr.Slider(minimum=0.0, maximum=1.0, value=0.7, step=0.1, interactive=True, label="Top P")
|
419 |
+
max_output_tokens = gr.Slider(minimum=0, maximum=2048, value=1024, step=32, interactive=True, label="Max output tokens")
|
420 |
speaker = gr.Radio(["Female", "Male"], value="Female", label="Speaker")
|
421 |
|
422 |
with gr.Column(scale=8):
|