Spaces:
Runtime error
Runtime error
Commit
·
617b624
1
Parent(s):
d059c05
Improve layout and remove footer
Browse filesSigned-off-by: Aivin V. Solatorio <avsolatorio@gmail.com>
- mcp_remote_client.py +9 -4
mcp_remote_client.py
CHANGED
|
@@ -245,7 +245,8 @@ class MCPClientWrapper:
|
|
| 245 |
"metadata": {
|
| 246 |
"title": f"Using tool: {tool_name.replace('avsolatorio_test_data_mcp_server', '')}",
|
| 247 |
"log": f"Parameters: {json.dumps(tool_args, ensure_ascii=True)}",
|
| 248 |
-
"status": "pending",
|
|
|
|
| 249 |
"id": f"tool_call_{tool_name}",
|
| 250 |
},
|
| 251 |
}
|
|
@@ -393,7 +394,9 @@ def gradio_interface(
|
|
| 393 |
|
| 394 |
client = MCPClientWrapper()
|
| 395 |
|
| 396 |
-
with gr.Blocks(
|
|
|
|
|
|
|
| 397 |
gr.Markdown("## Ask about the World Development Indicators (WDI) data")
|
| 398 |
# gr.Markdown("Connect to the WDI MCP server and chat with the assistant")
|
| 399 |
|
|
@@ -416,11 +419,13 @@ def gradio_interface(
|
|
| 416 |
|
| 417 |
chatbot = gr.Chatbot(
|
| 418 |
value=[],
|
| 419 |
-
height="
|
| 420 |
type="messages",
|
| 421 |
-
show_copy_button=
|
| 422 |
avatar_images=("img/small-user.png", "img/small-robot.png"),
|
| 423 |
autoscroll=True,
|
|
|
|
|
|
|
| 424 |
)
|
| 425 |
|
| 426 |
with gr.Row(equal_height=True):
|
|
|
|
| 245 |
"metadata": {
|
| 246 |
"title": f"Using tool: {tool_name.replace('avsolatorio_test_data_mcp_server', '')}",
|
| 247 |
"log": f"Parameters: {json.dumps(tool_args, ensure_ascii=True)}",
|
| 248 |
+
# "status": "pending",
|
| 249 |
+
"status": "done",
|
| 250 |
"id": f"tool_call_{tool_name}",
|
| 251 |
},
|
| 252 |
}
|
|
|
|
| 394 |
|
| 395 |
client = MCPClientWrapper()
|
| 396 |
|
| 397 |
+
with gr.Blocks(
|
| 398 |
+
title="WDI MCP Client", css="footer{display:none !important}"
|
| 399 |
+
) as demo:
|
| 400 |
gr.Markdown("## Ask about the World Development Indicators (WDI) data")
|
| 401 |
# gr.Markdown("Connect to the WDI MCP server and chat with the assistant")
|
| 402 |
|
|
|
|
| 419 |
|
| 420 |
chatbot = gr.Chatbot(
|
| 421 |
value=[],
|
| 422 |
+
height="81vh",
|
| 423 |
type="messages",
|
| 424 |
+
show_copy_button=False,
|
| 425 |
avatar_images=("img/small-user.png", "img/small-robot.png"),
|
| 426 |
autoscroll=True,
|
| 427 |
+
layout="panel",
|
| 428 |
+
placeholder="Ask development data questions!",
|
| 429 |
)
|
| 430 |
|
| 431 |
with gr.Row(equal_height=True):
|