Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -99,8 +99,8 @@ final_answer = FinalAnswerTool()
|
|
| 99 |
weather_forecast = WeatherForecast()
|
| 100 |
|
| 101 |
# model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
|
| 102 |
-
model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
|
| 103 |
|
|
|
|
| 104 |
model = HfApiModel(
|
| 105 |
max_tokens=2096,
|
| 106 |
temperature=0.5,
|
|
@@ -108,7 +108,6 @@ model = HfApiModel(
|
|
| 108 |
custom_role_conversions=None,
|
| 109 |
)
|
| 110 |
|
| 111 |
-
|
| 112 |
# Import tool from Hub
|
| 113 |
image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|
| 114 |
|
|
@@ -118,7 +117,7 @@ with open("prompts.yaml", 'r') as stream:
|
|
| 118 |
agent = CodeAgent(
|
| 119 |
model=model,
|
| 120 |
tools=[weather_forecast, final_answer], ## add your tools here (don't remove final answer)
|
| 121 |
-
max_steps=
|
| 122 |
verbosity_level=1,
|
| 123 |
grammar=None,
|
| 124 |
planning_interval=None,
|
|
|
|
| 99 |
weather_forecast = WeatherForecast()
|
| 100 |
|
| 101 |
# model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
|
|
|
|
| 102 |
|
| 103 |
+
model_id='Qwen/Qwen2.5-Coder-32B-Instruct' # it is possible that this model may be overloaded
|
| 104 |
model = HfApiModel(
|
| 105 |
max_tokens=2096,
|
| 106 |
temperature=0.5,
|
|
|
|
| 108 |
custom_role_conversions=None,
|
| 109 |
)
|
| 110 |
|
|
|
|
| 111 |
# Import tool from Hub
|
| 112 |
image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|
| 113 |
|
|
|
|
| 117 |
agent = CodeAgent(
|
| 118 |
model=model,
|
| 119 |
tools=[weather_forecast, final_answer], ## add your tools here (don't remove final answer)
|
| 120 |
+
max_steps=2,
|
| 121 |
verbosity_level=1,
|
| 122 |
grammar=None,
|
| 123 |
planning_interval=None,
|