Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -4,6 +4,7 @@ import requests
|
|
4 |
import pytz
|
5 |
import yaml
|
6 |
from tools.final_answer import FinalAnswerTool
|
|
|
7 |
|
8 |
from Gradio_UI import GradioUI
|
9 |
|
@@ -34,6 +35,17 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
34 |
return f"Error fetching time for timezone '{timezone}': {str(e)}"
|
35 |
|
36 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
final_answer = FinalAnswerTool()
|
38 |
|
39 |
# If the agent does not answer, the model is overloaded, please use another model or the following Hugging Face Endpoint that also contains qwen2.5 coder:
|
|
|
4 |
import pytz
|
5 |
import yaml
|
6 |
from tools.final_answer import FinalAnswerTool
|
7 |
+
import random
|
8 |
|
9 |
from Gradio_UI import GradioUI
|
10 |
|
|
|
35 |
return f"Error fetching time for timezone '{timezone}': {str(e)}"
|
36 |
|
37 |
|
38 |
+
@tool
|
39 |
+
def random_draw(min_number: int, max_number: int) -> int:
|
40 |
+
"""A tool that choses randomly a number between min_number and max_number, including them.
|
41 |
+
Args:
|
42 |
+
min_number: minimum integer that can be drawn.
|
43 |
+
max_number: maximum integer that can be drawn.
|
44 |
+
"""
|
45 |
+
res = random.randrange(min_number, max_number, 1)
|
46 |
+
return res
|
47 |
+
|
48 |
+
|
49 |
final_answer = FinalAnswerTool()
|
50 |
|
51 |
# If the agent does not answer, the model is overloaded, please use another model or the following Hugging Face Endpoint that also contains qwen2.5 coder:
|