Skip to content

Commit

Permalink
Merge pull request #79 from bytedance/web_demo
Browse files Browse the repository at this point in the history
fix: update web_demo.py
  • Loading branch information
TCL606 authored Oct 24, 2024
2 parents 398496d + 5360159 commit 70917fe
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions web_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,11 @@ def gradio_answer(chatbot, chat_state, num_beams, temperature, top_p):
upload_button.click(upload_speech, [speech, text_input, chat_state], [speech, text_input, upload_button, chat_state])

text_input.submit(gradio_ask, [text_input, chatbot, chat_state], [text_input, chatbot, chat_state]).then(
gradio_answer, [chatbot, chat_state, cfg], [chatbot, chat_state]
gradio_answer, [chatbot, chat_state], [chatbot, chat_state]
)
clear.click(gradio_reset, [chat_state], [chatbot, speech, text_input, upload_button, chat_state], queue=False)



demo.launch(share=True, enable_queue=True, server_port=int(args.port))
# demo.launch(share=True, enable_queue=True, server_port=int(args.port))
demo.launch(share=True, server_port=int(args.port))

0 comments on commit 70917fe

Please sign in to comment.