Update app.py
Browse files
app.py
CHANGED
@@ -38,9 +38,9 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
38 |
final_answer = FinalAnswerTool()
|
39 |
|
40 |
# 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:
|
41 |
-
|
42 |
#'Vikhrmodels/Vikhr-2-VL-2b-Instruct-experimental',# it is possible that this model may be overloaded
|
43 |
-
model_id='t-tech/T-pro-it-1.0'
|
44 |
|
45 |
model = HfApiModel(
|
46 |
max_tokens=2096,
|
@@ -49,7 +49,6 @@ model_id=model_id,
|
|
49 |
custom_role_conversions=None,
|
50 |
)
|
51 |
|
52 |
-
|
53 |
# Import tool from Hub
|
54 |
image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|
55 |
|
@@ -58,7 +57,7 @@ with open("prompts.yaml", 'r') as stream:
|
|
58 |
|
59 |
agent = CodeAgent(
|
60 |
model=model,
|
61 |
-
tools=[final_answer], ## add your tools here (don't remove final answer)
|
62 |
max_steps=6,
|
63 |
verbosity_level=1,
|
64 |
grammar=None,
|
|
|
38 |
final_answer = FinalAnswerTool()
|
39 |
|
40 |
# 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:
|
41 |
+
model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
|
42 |
#'Vikhrmodels/Vikhr-2-VL-2b-Instruct-experimental',# it is possible that this model may be overloaded
|
43 |
+
#model_id='t-tech/T-pro-it-1.0'
|
44 |
|
45 |
model = HfApiModel(
|
46 |
max_tokens=2096,
|
|
|
49 |
custom_role_conversions=None,
|
50 |
)
|
51 |
|
|
|
52 |
# Import tool from Hub
|
53 |
image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|
54 |
|
|
|
57 |
|
58 |
agent = CodeAgent(
|
59 |
model=model,
|
60 |
+
tools=[final_answer,get_current_time_in_timezone], ## add your tools here (don't remove final answer)
|
61 |
max_steps=6,
|
62 |
verbosity_level=1,
|
63 |
grammar=None,
|