kartikbagalore commited on
Commit
209060c
·
verified ·
1 Parent(s): ad11ccd

added category and year to tool

Browse files
Files changed (1) hide show
  1. app.py +6 -6
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: #it's import to specify the return type
13
- #Keep this format for the description / args / args description but feel free to modify the tool
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 = 3)
19
 
20
- results = ddgs.forward(f"Get the Academy award nominated Best Movies for the year {year}")
21
- return f"In {year}, the movies which were nominated for Academy aware are {results}"
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: