Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
from smolagents import CodeAgent,DuckDuckGoSearchTool,
|
| 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 =
|
| 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)}"
|