Spaces:
Sleeping
Sleeping
File size: 679 Bytes
4e25dcb e595c25 e4446af e595c25 4976e37 212b21f e595c25 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
from smolagents import LiteLLMModel, CodeAgent, WebSearchTool, GradioUI, Tool, ToolCollection, tool, load_tool
model = LiteLLMModel(model_id="groq/llama-3.3-70b-versatile")
weather_tool = load_tool("ngandugilbert/weather_tool", trust_remote_code=True)
image_generation_tool = Tool.from_space(
"black-forest-labs/FLUX.1-schnell",
name="image_generator",
description="Generate an image from a prompt"
)
# with ToolCollection.from_mcp({"url": "http://127.0.0.1:9000/mcp", "transport": "streamable-http"}, trust_remote_code=True) as tool_collection:
agent = CodeAgent(model=model, tools=[WebSearchTool(),image_generation_tool, weather_tool])
GradioUI(agent).launch() |