Spaces:
Sleeping
Sleeping
Update gradio_chatbot.py
Browse files- gradio_chatbot.py +3 -0
gradio_chatbot.py
CHANGED
|
@@ -97,6 +97,7 @@ with gr.Blocks() as demo:
|
|
| 97 |
|
| 98 |
msg.submit(
|
| 99 |
add_user_message,
|
|
|
|
| 100 |
inputs=[msg, chatbot, conversation_state],
|
| 101 |
outputs=[msg, chatbot, conversation_state],
|
| 102 |
show_progress="hidden"
|
|
@@ -114,6 +115,7 @@ with gr.Blocks() as demo:
|
|
| 114 |
|
| 115 |
send.click(
|
| 116 |
add_user_message,
|
|
|
|
| 117 |
inputs=[msg, chatbot, conversation_state],
|
| 118 |
outputs=[msg, chatbot, conversation_state],
|
| 119 |
show_progress="hidden"
|
|
@@ -138,4 +140,5 @@ with gr.Blocks() as demo:
|
|
| 138 |
|
| 139 |
if __name__ == "__main__":
|
| 140 |
logger.info("Running chatbot interface standalone")
|
|
|
|
| 141 |
demo.launch(server_name="0.0.0.0", server_port=7860)
|
|
|
|
| 97 |
|
| 98 |
msg.submit(
|
| 99 |
add_user_message,
|
| 100 |
+
queue=True,
|
| 101 |
inputs=[msg, chatbot, conversation_state],
|
| 102 |
outputs=[msg, chatbot, conversation_state],
|
| 103 |
show_progress="hidden"
|
|
|
|
| 115 |
|
| 116 |
send.click(
|
| 117 |
add_user_message,
|
| 118 |
+
queue=True,
|
| 119 |
inputs=[msg, chatbot, conversation_state],
|
| 120 |
outputs=[msg, chatbot, conversation_state],
|
| 121 |
show_progress="hidden"
|
|
|
|
| 140 |
|
| 141 |
if __name__ == "__main__":
|
| 142 |
logger.info("Running chatbot interface standalone")
|
| 143 |
+
demo.queue(default_concurrency_limit=1)
|
| 144 |
demo.launch(server_name="0.0.0.0", server_port=7860)
|