cedomin commited on
Commit
fd8fa4c
·
verified ·
1 Parent(s): 37a96c4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,4 +1,4 @@
1
- from smolagents import CodeAgent,DuckDuckGoSearchTool, DuckDuckGoSearchRun, HfApiModel,load_tool,tool
2
  import datetime
3
  import requests
4
  import pytz
@@ -17,7 +17,7 @@ def DuckDuckSearch(arg1:str)-> str: #it's import to specify the return type
17
  """
18
  try:
19
  # Get the search
20
- text = DuckDuckGoSearchRun(arg1)
21
  return f"The text about {arg1} is: {text}"
22
  except Exception as e:
23
  return f"Error fetching the search '{arg1}': {str(e)}"
 
1
+ from smolagents import CodeAgent, DuckDuckGoSearchTool, HfApiModel,load_tool,tool
2
  import datetime
3
  import requests
4
  import pytz
 
17
  """
18
  try:
19
  # Get the search
20
+ text = DuckDuckGoSearchTool(arg1)
21
  return f"The text about {arg1} is: {text}"
22
  except Exception as e:
23
  return f"Error fetching the search '{arg1}': {str(e)}"