KaiChen1998 commited on
Commit
1340ccf
Β·
verified Β·
1 Parent(s): 5ebdd9f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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=1024, value=512, 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):
 
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):