Spaces:
Sleeping
Sleeping
Update gradio_chatbot.py
Browse files- gradio_chatbot.py +12 -7
gradio_chatbot.py
CHANGED
|
@@ -97,20 +97,22 @@ with gr.Blocks() as demo:
|
|
| 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"
|
|
|
|
| 104 |
).then(
|
| 105 |
add_loading_animation,
|
| 106 |
inputs=[chatbot, conversation_state],
|
| 107 |
outputs=[chatbot, conversation_state],
|
| 108 |
-
show_progress="hidden"
|
|
|
|
| 109 |
).then(
|
| 110 |
generate_response,
|
| 111 |
inputs=[chatbot, conversation_state],
|
| 112 |
outputs=[chatbot, conversation_state],
|
| 113 |
-
show_progress="hidden"
|
|
|
|
| 114 |
)
|
| 115 |
|
| 116 |
send.click(
|
|
@@ -118,17 +120,20 @@ with gr.Blocks() as demo:
|
|
| 118 |
queue=True,
|
| 119 |
inputs=[msg, chatbot, conversation_state],
|
| 120 |
outputs=[msg, chatbot, conversation_state],
|
| 121 |
-
show_progress="hidden"
|
|
|
|
| 122 |
).then(
|
| 123 |
add_loading_animation,
|
| 124 |
inputs=[chatbot, conversation_state],
|
| 125 |
outputs=[chatbot, conversation_state],
|
| 126 |
-
show_progress="hidden"
|
|
|
|
| 127 |
).then(
|
| 128 |
generate_response,
|
| 129 |
inputs=[chatbot, conversation_state],
|
| 130 |
outputs=[chatbot, conversation_state],
|
| 131 |
-
show_progress="hidden"
|
|
|
|
| 132 |
)
|
| 133 |
|
| 134 |
clear.click(
|
|
|
|
| 97 |
|
| 98 |
msg.submit(
|
| 99 |
add_user_message,
|
|
|
|
| 100 |
inputs=[msg, chatbot, conversation_state],
|
| 101 |
outputs=[msg, chatbot, conversation_state],
|
| 102 |
+
show_progress="hidden",
|
| 103 |
+
queue=True,
|
| 104 |
).then(
|
| 105 |
add_loading_animation,
|
| 106 |
inputs=[chatbot, conversation_state],
|
| 107 |
outputs=[chatbot, conversation_state],
|
| 108 |
+
show_progress="hidden",
|
| 109 |
+
queue=True,
|
| 110 |
).then(
|
| 111 |
generate_response,
|
| 112 |
inputs=[chatbot, conversation_state],
|
| 113 |
outputs=[chatbot, conversation_state],
|
| 114 |
+
show_progress="hidden",
|
| 115 |
+
queue=True,
|
| 116 |
)
|
| 117 |
|
| 118 |
send.click(
|
|
|
|
| 120 |
queue=True,
|
| 121 |
inputs=[msg, chatbot, conversation_state],
|
| 122 |
outputs=[msg, chatbot, conversation_state],
|
| 123 |
+
show_progress="hidden",
|
| 124 |
+
queue=True,
|
| 125 |
).then(
|
| 126 |
add_loading_animation,
|
| 127 |
inputs=[chatbot, conversation_state],
|
| 128 |
outputs=[chatbot, conversation_state],
|
| 129 |
+
show_progress="hidden",
|
| 130 |
+
queue=True,
|
| 131 |
).then(
|
| 132 |
generate_response,
|
| 133 |
inputs=[chatbot, conversation_state],
|
| 134 |
outputs=[chatbot, conversation_state],
|
| 135 |
+
show_progress="hidden",
|
| 136 |
+
queue=True,
|
| 137 |
)
|
| 138 |
|
| 139 |
clear.click(
|