8PeopleINC commited on
Commit
01f77e0
·
verified ·
1 Parent(s): ea95f4f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -11,12 +11,12 @@ from Gradio_UI import GradioUI
11
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
12
 
13
  @tool
14
- def ddg_tool(query:str, city:str, max_results:int=5)-> list: # it's important to specify the return type
15
  # Keep this format for the tool description / args description but feel free to modify the tool
16
  """A tool that searches for restaraunts ina particular location using DuckDuckGo search.
17
  Args:
18
  query: The type of restaraunt cuisine or keyword (e.g. "italian").
19
- city: The city in which the restaraunts are located (e.g. "San Diego").
20
  max_results: Number of results to return. Maximum number is 5.
21
 
22
  Returns: List of dictionaries with Restaurant Name, city, and URL.
@@ -25,7 +25,7 @@ def ddg_tool(query:str, city:str, max_results:int=5)-> list: # it's important to
25
  ddg_tool = DDGS()
26
 
27
  # Modify query to include city for better results
28
- full_query = f"{query} restaurant in {city}"
29
 
30
  # Fetch results
31
  search_results = DDGS().text(full_query, max_results=max_results)
 
11
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
12
 
13
  @tool
14
+ def ddg_tool(query:str, city-state:str, max_results:int=5)-> list: # it's important to specify the return type
15
  # Keep this format for the tool description / args description but feel free to modify the tool
16
  """A tool that searches for restaraunts ina particular location using DuckDuckGo search.
17
  Args:
18
  query: The type of restaraunt cuisine or keyword (e.g. "italian").
19
+ city-state: The city in which the restaraunts are located (e.g. "San Diego, CA").
20
  max_results: Number of results to return. Maximum number is 5.
21
 
22
  Returns: List of dictionaries with Restaurant Name, city, and URL.
 
25
  ddg_tool = DDGS()
26
 
27
  # Modify query to include city for better results
28
+ full_query = f"{query} restaurant in {city-state}"
29
 
30
  # Fetch results
31
  search_results = DDGS().text(full_query, max_results=max_results)