ddengrepo commited on
Commit
ab23205
·
1 Parent(s): 0cc96db
Files changed (3) hide show
  1. pyproject.toml +3 -1
  2. server.py +7 -2
  3. uv.lock +0 -0
pyproject.toml CHANGED
@@ -7,5 +7,7 @@ requires-python = ">=3.12"
7
  dependencies = [
8
  "gradio[mcp]>=5.31.0",
9
  "mcp>=1.9.0",
10
- "smolagents[mcp]>=1.16.1",
 
 
11
  ]
 
7
  dependencies = [
8
  "gradio[mcp]>=5.31.0",
9
  "mcp>=1.9.0",
10
+ "ollama>=0.4.8",
11
+ "smolagents[litellm,mcp]>=1.16.1",
12
+ "sympy>=1.14.0",
13
  ]
server.py CHANGED
@@ -9,12 +9,17 @@ try:
9
  mcp_client = MCPClient(
10
  ## Try this working example on the hub:
11
  # {"url": "https://abidlabs-mcp-tools.hf.space/gradio_api/mcp/sse"}
12
- {"url": "http://localhost:7860/gradio_api/mcp/sse"}
13
  )
14
  tools = mcp_client.get_tools()
15
 
16
  model = InferenceClientModel()
17
- agent = CodeAgent(tools=[*tools], model=model)
 
 
 
 
 
18
 
19
  demo = gr.ChatInterface(
20
  fn=lambda message, history: str(agent.run(message)),
 
9
  mcp_client = MCPClient(
10
  ## Try this working example on the hub:
11
  # {"url": "https://abidlabs-mcp-tools.hf.space/gradio_api/mcp/sse"}
12
+ {"url": "http://127.0.0.1:7861/gradio_api/mcp/sse"}
13
  )
14
  tools = mcp_client.get_tools()
15
 
16
  model = InferenceClientModel()
17
+ authorized_agent_imports = ["math", "textblob", "sympy"]
18
+
19
+ agent = CodeAgent(tools=[*tools],
20
+ model=model,
21
+ additional_authorized_imports = authorized_agent_imports,
22
+ )
23
 
24
  demo = gr.ChatInterface(
25
  fn=lambda message, history: str(agent.run(message)),
uv.lock CHANGED
The diff for this file is too large to render. See raw diff