Spaces:
Sleeping
Sleeping
JM8
commited on
Commit
·
7f41078
1
Parent(s):
d8e6fe3
Back to default!
Browse files
app.py
CHANGED
|
@@ -10,7 +10,7 @@ try:
|
|
| 10 |
)
|
| 11 |
tools = mcp_client.get_tools()
|
| 12 |
|
| 13 |
-
model = InferenceClientModel(token=os.getenv("
|
| 14 |
agent = CodeAgent(tools=[*tools], model=model, additional_authorized_imports=["json", "ast", "urllib", "base64"])
|
| 15 |
|
| 16 |
demo = gr.ChatInterface(
|
|
@@ -21,6 +21,6 @@ try:
|
|
| 21 |
description="This is a simple agent that uses MCP tools to answer questions.",
|
| 22 |
)
|
| 23 |
|
| 24 |
-
demo.launch(
|
| 25 |
finally:
|
| 26 |
mcp_client.disconnect()
|
|
|
|
| 10 |
)
|
| 11 |
tools = mcp_client.get_tools()
|
| 12 |
|
| 13 |
+
model = InferenceClientModel(token=os.getenv("HF_TOKEN"))
|
| 14 |
agent = CodeAgent(tools=[*tools], model=model, additional_authorized_imports=["json", "ast", "urllib", "base64"])
|
| 15 |
|
| 16 |
demo = gr.ChatInterface(
|
|
|
|
| 21 |
description="This is a simple agent that uses MCP tools to answer questions.",
|
| 22 |
)
|
| 23 |
|
| 24 |
+
demo.launch()
|
| 25 |
finally:
|
| 26 |
mcp_client.disconnect()
|