Spaces:
Sleeping
Sleeping
tool
Browse files
app.py
CHANGED
|
@@ -9,14 +9,13 @@ from Gradio_UI import GradioUI
|
|
| 9 |
|
| 10 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 11 |
@tool
|
| 12 |
-
def
|
| 13 |
-
|
| 14 |
-
"""A tool that does nothing yet
|
| 15 |
Args:
|
| 16 |
-
|
| 17 |
-
|
| 18 |
"""
|
| 19 |
-
return "
|
| 20 |
|
| 21 |
@tool
|
| 22 |
def get_current_time_in_timezone(timezone: str) -> str:
|
|
@@ -36,14 +35,12 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
| 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:
|
| 40 |
-
# model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
|
| 41 |
-
|
| 42 |
model = HfApiModel(
|
| 43 |
max_tokens=2096,
|
| 44 |
temperature=0.5,
|
| 45 |
#model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
|
| 46 |
-
model_id='https://jc26mwg228mkj8dw.us-east-1.aws.endpoints.huggingface.cloud',
|
|
|
|
| 47 |
custom_role_conversions=None,
|
| 48 |
)
|
| 49 |
|
|
@@ -67,4 +64,4 @@ agent = CodeAgent(
|
|
| 67 |
)
|
| 68 |
|
| 69 |
|
| 70 |
-
GradioUI(agent).launch()
|
|
|
|
| 9 |
|
| 10 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 11 |
@tool
|
| 12 |
+
def greet_tool(firstName:str, lastName:int)-> str:
|
| 13 |
+
"""A tool that greets someone
|
|
|
|
| 14 |
Args:
|
| 15 |
+
firstName: the first name of a person
|
| 16 |
+
lastName: the age of a person
|
| 17 |
"""
|
| 18 |
+
return f"HELLO HELLO {arg1}"
|
| 19 |
|
| 20 |
@tool
|
| 21 |
def get_current_time_in_timezone(timezone: str) -> str:
|
|
|
|
| 35 |
|
| 36 |
final_answer = FinalAnswerTool()
|
| 37 |
|
|
|
|
|
|
|
|
|
|
| 38 |
model = HfApiModel(
|
| 39 |
max_tokens=2096,
|
| 40 |
temperature=0.5,
|
| 41 |
#model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
|
| 42 |
+
#model_id='https://jc26mwg228mkj8dw.us-east-1.aws.endpoints.huggingface.cloud',
|
| 43 |
+
model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud',
|
| 44 |
custom_role_conversions=None,
|
| 45 |
)
|
| 46 |
|
|
|
|
| 64 |
)
|
| 65 |
|
| 66 |
|
| 67 |
+
GradioUI(agent).launch()
|