Spaces:
Sleeping
Sleeping
Add NASANeoDataFetcher tool
Browse files
app.py
CHANGED
@@ -6,6 +6,7 @@ import yaml
|
|
6 |
import requests
|
7 |
import os
|
8 |
from tools.final_answer import FinalAnswerTool
|
|
|
9 |
|
10 |
from Gradio_UI import GradioUI
|
11 |
|
@@ -57,8 +58,8 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
57 |
return f"Error fetching time for timezone '{timezone}': {str(e)}"
|
58 |
|
59 |
web_search = DuckDuckGoSearchTool()
|
60 |
-
|
61 |
final_answer = FinalAnswerTool()
|
|
|
62 |
|
63 |
# 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:
|
64 |
|
@@ -80,7 +81,7 @@ with open("prompts.yaml", 'r') as stream:
|
|
80 |
|
81 |
agent = CodeAgent(
|
82 |
model=model,
|
83 |
-
tools=[final_answer, image_generation_tool, web_search,
|
84 |
max_steps=6,
|
85 |
verbosity_level=1,
|
86 |
grammar=None,
|
|
|
6 |
import requests
|
7 |
import os
|
8 |
from tools.final_answer import FinalAnswerTool
|
9 |
+
from tools.nasa_neo_data_fetcher import NASANeoDataFetcher
|
10 |
|
11 |
from Gradio_UI import GradioUI
|
12 |
|
|
|
58 |
return f"Error fetching time for timezone '{timezone}': {str(e)}"
|
59 |
|
60 |
web_search = DuckDuckGoSearchTool()
|
|
|
61 |
final_answer = FinalAnswerTool()
|
62 |
+
nasa_neo_data = NASANeoDataFetcher()
|
63 |
|
64 |
# 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:
|
65 |
|
|
|
81 |
|
82 |
agent = CodeAgent(
|
83 |
model=model,
|
84 |
+
tools=[final_answer, image_generation_tool, web_search, nasa_neo_data], ## add your tools here (don't remove final answer)
|
85 |
max_steps=6,
|
86 |
verbosity_level=1,
|
87 |
grammar=None,
|