Spaces:
Sleeping
Sleeping
second app.py
Browse files
app.py
CHANGED
|
@@ -65,12 +65,12 @@ final_answer = FinalAnswerTool()
|
|
| 65 |
# 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:
|
| 66 |
# model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
|
| 67 |
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
|
| 75 |
|
| 76 |
# Import tool from Hub
|
|
@@ -80,7 +80,7 @@ with open("prompts.yaml", 'r') as stream:
|
|
| 80 |
prompt_templates = yaml.safe_load(stream)
|
| 81 |
|
| 82 |
agent = CodeAgent(
|
| 83 |
-
model=
|
| 84 |
tools=[final_answer,
|
| 85 |
get_current_time_in_timezone,
|
| 86 |
generate_image,
|
|
|
|
| 65 |
# 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:
|
| 66 |
# model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
|
| 67 |
|
| 68 |
+
model = HfApiModel(
|
| 69 |
+
max_tokens=2096,
|
| 70 |
+
temperature=0.5,
|
| 71 |
+
model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
|
| 72 |
+
custom_role_conversions=None,
|
| 73 |
+
)
|
| 74 |
|
| 75 |
|
| 76 |
# Import tool from Hub
|
|
|
|
| 80 |
prompt_templates = yaml.safe_load(stream)
|
| 81 |
|
| 82 |
agent = CodeAgent(
|
| 83 |
+
model=model,
|
| 84 |
tools=[final_answer,
|
| 85 |
get_current_time_in_timezone,
|
| 86 |
generate_image,
|