NLarchive commited on
Commit
2c17301
·
verified ·
1 Parent(s): ac297e1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -2,7 +2,7 @@ import gradio as gr
2
  import os
3
 
4
  from mcp import StdioServerParameters
5
- from smolagents import InferenceClientModel, CodeAgent, ToolCollection, MCPClient, HfApiModel
6
 
7
 
8
  try:
@@ -10,7 +10,7 @@ try:
10
  {"url": "https://nlarchive-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
- model = HfApiModel(provider="together", model="Qwen/Qwen2.5-Coder-32B-Instruct")
14
  agent = CodeAgent(tools=[*tools], model=model)
15
 
16
  demo = gr.ChatInterface(
 
2
  import os
3
 
4
  from mcp import StdioServerParameters
5
+ from smolagents import InferenceClientModel, CodeAgent, ToolCollection, MCPClient
6
 
7
 
8
  try:
 
10
  {"url": "https://nlarchive-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
+ model = InferenceClientModel(token=os.getenv("HF_TOKEN"))
14
  agent = CodeAgent(tools=[*tools], model=model)
15
 
16
  demo = gr.ChatInterface(