hardknee commited on
Commit
c71539b
·
verified ·
1 Parent(s): 6a4f632

Update app.py

Browse files

Fixed None runtime error pm get_web_search_results

Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -27,7 +27,7 @@ def get_web_search_results(query: str)-> str: #it's import to specify the return
27
  """
28
  try:
29
  results = DuckDuckGoSearchTool.forward(query)
30
- if results not None:
31
  return results
32
  else:
33
  return "Your query may be incorrectly formatted. Ensure it is of type str e.g. 'bananas'"
 
27
  """
28
  try:
29
  results = DuckDuckGoSearchTool.forward(query)
30
+ if results:
31
  return results
32
  else:
33
  return "Your query may be incorrectly formatted. Ensure it is of type str e.g. 'bananas'"