ngandugilbert commited on
Commit
4e25dcb
·
verified ·
1 Parent(s): 212b21f

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -12
main.py CHANGED
@@ -1,19 +1,9 @@
1
- from smolagents import LiteLLMModel, CodeAgent, WebSearchTool, GradioUI, Tool, ToolCollection, tool
2
 
3
  model = LiteLLMModel(model_id="groq/llama-3.3-70b-versatile")
4
 
5
 
6
-
7
- @tool
8
- def weather_tool(city: str)-> str:
9
- """
10
- This is a tool to get weather information about a particular city
11
-
12
- args:
13
- city: str
14
- """
15
-
16
- return f"The current weather in {city} is 25 degrees celsius."
17
 
18
  image_generation_tool = Tool.from_space(
19
  "black-forest-labs/FLUX.1-schnell",
 
1
+ from smolagents import LiteLLMModel, CodeAgent, WebSearchTool, GradioUI, Tool, ToolCollection, tool, load_tool
2
 
3
  model = LiteLLMModel(model_id="groq/llama-3.3-70b-versatile")
4
 
5
 
6
+ weather_tool = load_tool("ngandugilbert/weather_tool", trust_remote=True)
 
 
 
 
 
 
 
 
 
 
7
 
8
  image_generation_tool = Tool.from_space(
9
  "black-forest-labs/FLUX.1-schnell",