x1001000 Claude commited on
Commit
14adb83
·
1 Parent(s): 42d90e6

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]>

Files changed (1) hide show
  1. app.py +6 -1
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(fn=get_stock_etf_info_url, inputs=["text", "text", "text"], outputs="text", allow_flagging="never")
 
 
 
 
 
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)