Add ask_madam function to Gradio interface for MCP server
Browse files- Updated gr.Interface to include both functions as a list
- ask_madam now accessible through MCP server alongside get_stock_etf_info_url
- Configured proper inputs/outputs for multi-function interface
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
app.py
CHANGED
@@ -65,5 +65,10 @@ def ask_madam(question):
|
|
65 |
except requests.exceptions.RequestException as e:
|
66 |
return f"Error communicating with Madam API: {str(e)}"
|
67 |
|
68 |
-
demo = gr.Interface(
|
|
|
|
|
|
|
|
|
|
|
69 |
demo.launch(mcp_server=True)
|
|
|
65 |
except requests.exceptions.RequestException as e:
|
66 |
return f"Error communicating with Madam API: {str(e)}"
|
67 |
|
68 |
+
demo = gr.Interface(
|
69 |
+
fn=[get_stock_etf_info_url, ask_madam],
|
70 |
+
inputs=[["text", "text", "text"], "text"],
|
71 |
+
outputs=["text", "text"],
|
72 |
+
allow_flagging="never"
|
73 |
+
)
|
74 |
demo.launch(mcp_server=True)
|