Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -10,13 +10,13 @@ from Gradio_UI import GradioUI
|
|
| 10 |
|
| 11 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 12 |
@tool
|
| 13 |
-
def get_dice_rolls(n_faces:int, n_dice:int)->
|
| 14 |
"""A tool that rolls dice
|
| 15 |
Args:
|
| 16 |
n_faces: number of dice faces
|
| 17 |
n_dice: number of dice to roll
|
| 18 |
"""
|
| 19 |
-
return [random.randint(1, faces) for _ in range(n_dice)]
|
| 20 |
|
| 21 |
@tool
|
| 22 |
def get_current_time_in_timezone(timezone: str) -> str:
|
|
@@ -43,7 +43,7 @@ duck_duck_tool = DuckDuckGoSearchTool()
|
|
| 43 |
model = HfApiModel(
|
| 44 |
max_tokens=2096,
|
| 45 |
temperature=0.5,
|
| 46 |
-
model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
|
| 47 |
custom_role_conversions=None,
|
| 48 |
)
|
| 49 |
|
|
|
|
| 10 |
|
| 11 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 12 |
@tool
|
| 13 |
+
def get_dice_rolls(n_faces:int, n_dice:int)-> str:
|
| 14 |
"""A tool that rolls dice
|
| 15 |
Args:
|
| 16 |
n_faces: number of dice faces
|
| 17 |
n_dice: number of dice to roll
|
| 18 |
"""
|
| 19 |
+
return str([random.randint(1, faces) for _ in range(n_dice)])
|
| 20 |
|
| 21 |
@tool
|
| 22 |
def get_current_time_in_timezone(timezone: str) -> str:
|
|
|
|
| 43 |
model = HfApiModel(
|
| 44 |
max_tokens=2096,
|
| 45 |
temperature=0.5,
|
| 46 |
+
model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud', # 'Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
|
| 47 |
custom_role_conversions=None,
|
| 48 |
)
|
| 49 |
|