avsolatorio commited on
Commit
f3c6459
·
1 Parent(s): 617b624

Improve design

Browse files

Signed-off-by: Aivin V. Solatorio <[email protected]>

Files changed (1) hide show
  1. mcp_remote_client.py +22 -8
mcp_remote_client.py CHANGED
@@ -393,11 +393,24 @@ def gradio_interface(
393
  # server_path_or_url = "wdi_mcp_server.py"
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
 
403
  with gr.Accordion(
@@ -430,11 +443,12 @@ def gradio_interface(
430
 
431
  with gr.Row(equal_height=True):
432
  msg = gr.Textbox(
433
- label="Your Question",
434
  placeholder="Ask about what indicators are available for a specific topic (e.g., What's the definition of GDP?)",
435
  scale=4,
 
436
  )
437
- clear_btn = gr.Button("Clear Chat", scale=1)
438
 
439
  # connect_btn.click(client.connect, inputs=server_path, outputs=status)
440
  # Automatically call client.connect(...) as soon as the interface loads
@@ -443,7 +457,7 @@ def gradio_interface(
443
  )
444
 
445
  msg.submit(client.process_message, [msg, chatbot], [chatbot, msg])
446
- clear_btn.click(lambda: [], None, chatbot)
447
 
448
  demo.unload(client.disconnect)
449
 
 
393
  # server_path_or_url = "wdi_mcp_server.py"
394
 
395
  client = MCPClientWrapper()
396
+ custom_css = """
397
+ .gradio-container {
398
+ background-color: #f0f0f0 !important;
399
+ }
400
+ .message-row.panel.bot-row {
401
+ background-color: #ebeef4 !important;
402
+ }
403
+ .message-row.panel.user-row {
404
+ background-color: #fff !important;
405
+ }
406
+ .user {
407
+ background-color: #fff !important;
408
+ }
409
+ footer{display:none !important}
410
+ """
411
+
412
+ with gr.Blocks(title="WDI MCP Client", css=custom_css) as demo:
413
+ gr.Markdown("## Development Data Chat")
414
  # gr.Markdown("Connect to the WDI MCP server and chat with the assistant")
415
 
416
  with gr.Accordion(
 
443
 
444
  with gr.Row(equal_height=True):
445
  msg = gr.Textbox(
446
+ label=None,
447
  placeholder="Ask about what indicators are available for a specific topic (e.g., What's the definition of GDP?)",
448
  scale=4,
449
+ show_label=False,
450
  )
451
+ # clear_btn = gr.Button("Clear Chat", scale=1)
452
 
453
  # connect_btn.click(client.connect, inputs=server_path, outputs=status)
454
  # Automatically call client.connect(...) as soon as the interface loads
 
457
  )
458
 
459
  msg.submit(client.process_message, [msg, chatbot], [chatbot, msg])
460
+ # clear_btn.click(lambda: [], None, chatbot)
461
 
462
  demo.unload(client.disconnect)
463