ttiaggoc commited on
Commit
6557e5b
·
1 Parent(s): 9b32755

Fix mcp server endpoint

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -7,7 +7,7 @@ from smolagents import InferenceClientModel, CodeAgent, ToolCollection, MCPClien
7
  mcp_client = None
8
  try:
9
  mcp_client = MCPClient(
10
- {"url": "http://localhost:7860/gradio_api/mcp/sse"} # This is the MCP Server we created in the previous section
11
  )
12
  tools = mcp_client.get_tools()
13
 
@@ -22,6 +22,7 @@ try:
22
  description="This is a simple agent that uses MCP tools to answer questions.",
23
  )
24
 
 
25
  demo.launch()
26
  finally:
27
  if(mcp_client != None):
 
7
  mcp_client = None
8
  try:
9
  mcp_client = MCPClient(
10
+ {"url": "https://ttiaggoc-mcp-sentiment.hf.space/gradio_api/mcp/sse"} # This is the MCP Server we created in the previous section
11
  )
12
  tools = mcp_client.get_tools()
13
 
 
22
  description="This is a simple agent that uses MCP tools to answer questions.",
23
  )
24
 
25
+ #demo.launch(server_name="0.0.0.0", server_port=9060)
26
  demo.launch()
27
  finally:
28
  if(mcp_client != None):