File size: 405 Bytes
7da81aa
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from smolagents import GradioUI
from agent import create_agent_with_mcp
import os

# Initialize the agent and client
# The client connection stays alive as long as this process is running
agent, client = create_agent_with_mcp()

def main():
    # Create the Gradio UI
    ui = GradioUI(agent)
    # Launch with public link if possible, or just local
    ui.launch()

if __name__ == "__main__":
    main()