Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
from smolagents import CodeAgent,DuckDuckGoSearchTool, HfApiModel,load_tool,tool
|
| 2 |
import datetime
|
| 3 |
import requests
|
| 4 |
import pytz
|
|
@@ -41,7 +41,7 @@ def surf_internet(question:str)->str:
|
|
| 41 |
"""
|
| 42 |
try:
|
| 43 |
# Create timezone object
|
| 44 |
-
ans =
|
| 45 |
return f"The answer for {question} is: {ans}"
|
| 46 |
except Exception as e:
|
| 47 |
return f"Error fetching time for the online answer for': {question}"
|
|
|
|
| 1 |
+
from smolagents import CodeAgent,DuckDuckGoSearchTool, HfApiModel,load_tool,tool
|
| 2 |
import datetime
|
| 3 |
import requests
|
| 4 |
import pytz
|
|
|
|
| 41 |
"""
|
| 42 |
try:
|
| 43 |
# Create timezone object
|
| 44 |
+
ans = DuckDuckGoSearchTool(question)
|
| 45 |
return f"The answer for {question} is: {ans}"
|
| 46 |
except Exception as e:
|
| 47 |
return f"Error fetching time for the online answer for': {question}"
|