Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
from smolagents import CodeAgent,DuckDuckGoSearchTool, HfApiModel,load_tool,tool
|
| 2 |
import datetime
|
|
|
|
| 3 |
import requests
|
| 4 |
import pytz
|
| 5 |
import yaml
|
|
@@ -30,8 +31,7 @@ def get_dad_jokes(arg1:str, arg2:int)-> str: #it's import to specify the return
|
|
| 30 |
]
|
| 31 |
|
| 32 |
# Use modulo to safely loop through the jokes
|
| 33 |
-
|
| 34 |
-
return f"Dad Joke: {jokes[index]}"
|
| 35 |
|
| 36 |
@tool
|
| 37 |
def get_current_time_in_timezone(timezone: str) -> str:
|
|
|
|
| 1 |
from smolagents import CodeAgent,DuckDuckGoSearchTool, HfApiModel,load_tool,tool
|
| 2 |
import datetime
|
| 3 |
+
import random
|
| 4 |
import requests
|
| 5 |
import pytz
|
| 6 |
import yaml
|
|
|
|
| 31 |
]
|
| 32 |
|
| 33 |
# Use modulo to safely loop through the jokes
|
| 34 |
+
return f"Dad Joke: {random.choice(jokes)}"
|
|
|
|
| 35 |
|
| 36 |
@tool
|
| 37 |
def get_current_time_in_timezone(timezone: str) -> str:
|