Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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
|
| 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 =
|
| 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(
|