Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,14 +9,14 @@ from Gradio_UI import GradioUI
|
|
| 9 |
|
| 10 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 11 |
@tool
|
| 12 |
-
def
|
| 13 |
-
"""A tool that
|
| 14 |
Args:
|
| 15 |
-
|
| 16 |
-
|
| 17 |
"""
|
| 18 |
-
|
| 19 |
-
return f"The
|
| 20 |
|
| 21 |
@tool
|
| 22 |
def get_current_time_in_timezone(timezone: str) -> str:
|
|
@@ -57,7 +57,7 @@ with open("prompts.yaml", 'r') as stream:
|
|
| 57 |
agent = CodeAgent(
|
| 58 |
model=model,
|
| 59 |
## add your tools here (don't remove final answer)
|
| 60 |
-
tools=[final_answer, image_generation_tool, DuckDuckGoSearchTool(),
|
| 61 |
max_steps=6,
|
| 62 |
verbosity_level=1,
|
| 63 |
grammar=None,
|
|
|
|
| 9 |
|
| 10 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 11 |
@tool
|
| 12 |
+
def find_website(site:str) -> str:
|
| 13 |
+
"""A tool that finds websites.
|
| 14 |
Args:
|
| 15 |
+
site: website to find
|
| 16 |
+
|
| 17 |
"""
|
| 18 |
+
webpage = requests.get(site)
|
| 19 |
+
return f"The webpage {webpage} has been found."
|
| 20 |
|
| 21 |
@tool
|
| 22 |
def get_current_time_in_timezone(timezone: str) -> str:
|
|
|
|
| 57 |
agent = CodeAgent(
|
| 58 |
model=model,
|
| 59 |
## add your tools here (don't remove final answer)
|
| 60 |
+
tools=[final_answer, image_generation_tool, DuckDuckGoSearchTool(), find_website],
|
| 61 |
max_steps=6,
|
| 62 |
verbosity_level=1,
|
| 63 |
grammar=None,
|