techarmour commited on
Commit
763e61f
·
1 Parent(s): b36e127

remove try and add main

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -4,7 +4,7 @@ import os
4
  from smolagents import InferenceClientModel, CodeAgent, ToolCollection, MCPClient
5
 
6
 
7
- try:
8
 
9
  mcp_client = MCPClient(
10
  {"url": "https://techarmour-mcp-sentiment.hf.space/gradio_api/mcp/sse"}
@@ -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
- mcp_client.disconnect()
 
 
4
  from smolagents import InferenceClientModel, CodeAgent, ToolCollection, MCPClient
5
 
6
 
7
+ ##try:
8
 
9
  mcp_client = MCPClient(
10
  {"url": "https://techarmour-mcp-sentiment.hf.space/gradio_api/mcp/sse"}
 
22
  description="This is a simple agent that uses MCP tools to answer questions.",
23
  )
24
 
25
+ if __name__ == "__main__":
26
+ demo.launch()
27
+ ##finally:
28
+ ## mcp_client.disconnect()