Spaces:
Sleeping
Sleeping
added category and year to tool
Browse files
app.py
CHANGED
|
@@ -9,16 +9,16 @@ 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 get_academy_award_nominees(year:str)-> str:
|
| 13 |
-
|
| 14 |
-
"""A tool that returns the Academy award nominees for a particular year
|
| 15 |
Args:
|
| 16 |
year: the year of interest (e.g. 1995)
|
|
|
|
| 17 |
"""
|
| 18 |
-
ddgs = DuckDuckGoSearchTool(max_results =
|
| 19 |
|
| 20 |
-
results = ddgs.forward(f"Get the Academy award nominated Best Movies for the year {year}")
|
| 21 |
-
return f"In {year}, the
|
| 22 |
|
| 23 |
@tool
|
| 24 |
def get_current_time_in_timezone(timezone: str) -> str:
|
|
|
|
| 9 |
|
| 10 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 11 |
@tool
|
| 12 |
+
def get_academy_award_nominees(year:str, category: str)-> str:
|
| 13 |
+
"""A tool that returns the Academy award nominees for a particular year in a particular category.
|
|
|
|
| 14 |
Args:
|
| 15 |
year: the year of interest (e.g. 1995)
|
| 16 |
+
category: the category of interest (e.g. 'Best Picture', 'Best Actor', 'Best Actress')
|
| 17 |
"""
|
| 18 |
+
ddgs = DuckDuckGoSearchTool(max_results = 5)
|
| 19 |
|
| 20 |
+
results = ddgs.forward(f"Get the Academy award nominated Best Movies for the year {year} in the category {category}")
|
| 21 |
+
return f"In {year}, for the {category} category, these are the links to the nominations {results}"
|
| 22 |
|
| 23 |
@tool
|
| 24 |
def get_current_time_in_timezone(timezone: str) -> str:
|