fix: update Gradio UI interactions to hide MCP Tools
Browse files
app.py
CHANGED
|
@@ -96,13 +96,15 @@ with gr.Blocks(title="Unpredictable Lord") as demo:
|
|
| 96 |
):
|
| 97 |
yield updated_history
|
| 98 |
|
| 99 |
-
msg.submit(
|
| 100 |
-
|
| 101 |
-
)
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
|
|
|
|
|
|
| 106 |
|
| 107 |
# MCP Server Tab
|
| 108 |
with gr.TabItem("MCP Server"):
|
|
|
|
| 96 |
):
|
| 97 |
yield updated_history
|
| 98 |
|
| 99 |
+
msg.submit(
|
| 100 |
+
user, [msg, chatbot], [msg, chatbot], queue=False, show_api=False
|
| 101 |
+
).then(bot, chatbot, chatbot, show_api=False)
|
| 102 |
+
|
| 103 |
+
submit_btn.click(
|
| 104 |
+
user, [msg, chatbot], [msg, chatbot], queue=False, show_api=False
|
| 105 |
+
).then(bot, chatbot, chatbot, show_api=False)
|
| 106 |
+
|
| 107 |
+
clear.click(lambda: None, None, chatbot, queue=False, show_api=False)
|
| 108 |
|
| 109 |
# MCP Server Tab
|
| 110 |
with gr.TabItem("MCP Server"):
|