aniketkno commited on
Commit
eeca5d9
·
verified ·
1 Parent(s): 3b4ba4d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -4,6 +4,7 @@ import requests
4
  import pytz
5
  import yaml
6
  from tools.final_answer import FinalAnswerTool
 
7
 
8
  from Gradio_UI import GradioUI
9
 
@@ -118,6 +119,7 @@ def get_coordinates_no_api_key(city_name: str) -> [float, float]:
118
  # return f"Error fetching weather conditions for {city}"
119
 
120
  final_answer = FinalAnswerTool()
 
121
 
122
  # If the agent does not answer, the model is overloaded, please use another model or the following Hugging Face Endpoint that also contains qwen2.5 coder:
123
  # model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
@@ -138,7 +140,7 @@ with open("prompts.yaml", 'r') as stream:
138
 
139
  agent = CodeAgent(
140
  model=model,
141
- tools=[get_weather_forecast, final_answer], ## add your tools here (don't remove final answer)
142
  max_steps=6,
143
  verbosity_level=1,
144
  grammar=None,
 
4
  import pytz
5
  import yaml
6
  from tools.final_answer import FinalAnswerTool
7
+ from tools.weather import WeatherForecast
8
 
9
  from Gradio_UI import GradioUI
10
 
 
119
  # return f"Error fetching weather conditions for {city}"
120
 
121
  final_answer = FinalAnswerTool()
122
+ weather = WeatherForecast()
123
 
124
  # If the agent does not answer, the model is overloaded, please use another model or the following Hugging Face Endpoint that also contains qwen2.5 coder:
125
  # model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
 
140
 
141
  agent = CodeAgent(
142
  model=model,
143
+ tools=[weather, final_answer], ## add your tools here (don't remove final answer)
144
  max_steps=6,
145
  verbosity_level=1,
146
  grammar=None,