hardknee commited on
Commit
3f612c2
·
verified ·
1 Parent(s): c5be38d

Update app.py

Browse files

Modifed approach to calling DuckDuckGoSearchTool

Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -25,8 +25,9 @@ def get_web_search_results(query: str)-> str: #it's import to specify the return
25
  Args:
26
  query: A string representing a valid web query. IMPORTANT: Follow type str format strictly e.g. 'pictures of cats'.
27
  """
 
28
  try:
29
- results = DuckDuckGoSearchTool(query)
30
  if results and results != "None":
31
  return results
32
  else:
 
25
  Args:
26
  query: A string representing a valid web query. IMPORTANT: Follow type str format strictly e.g. 'pictures of cats'.
27
  """
28
+ search_results_tool = DuckDuckGoSearchTool()
29
  try:
30
+ results = search_results_tool(query)
31
  if results and results != "None":
32
  return results
33
  else: