Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -13,17 +13,19 @@ def say_hello(name: str) -> str:
|
|
| 13 |
final_answer = FinalAnswerTool()
|
| 14 |
|
| 15 |
model = HfApiModel(
|
| 16 |
-
max_tokens=
|
| 17 |
temperature=0.5,
|
| 18 |
-
model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud',
|
| 19 |
)
|
| 20 |
|
|
|
|
|
|
|
| 21 |
agent = CodeAgent(
|
| 22 |
model=model,
|
| 23 |
tools=[final_answer, say_hello],
|
| 24 |
-
max_steps=
|
| 25 |
-
verbosity_level=2,
|
| 26 |
-
prompt_templates=
|
| 27 |
)
|
| 28 |
|
| 29 |
GradioUI(agent).launch()
|
|
|
|
| 13 |
final_answer = FinalAnswerTool()
|
| 14 |
|
| 15 |
model = HfApiModel(
|
| 16 |
+
max_tokens=100, # Уменьшили до 100
|
| 17 |
temperature=0.5,
|
| 18 |
+
model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud',
|
| 19 |
)
|
| 20 |
|
| 21 |
+
prompt_templates = {"default": "Answer: {{question}}"}
|
| 22 |
+
|
| 23 |
agent = CodeAgent(
|
| 24 |
model=model,
|
| 25 |
tools=[final_answer, say_hello],
|
| 26 |
+
max_steps=1, # Ограничим до 1 шага
|
| 27 |
+
verbosity_level=2,
|
| 28 |
+
prompt_templates=prompt_templates,
|
| 29 |
)
|
| 30 |
|
| 31 |
GradioUI(agent).launch()
|