Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -14,9 +14,19 @@ DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
|
| 14 |
# ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
|
| 15 |
class BasicAgent:
|
| 16 |
def __init__(self):
|
| 17 |
-
self.
|
| 18 |
# CodeAgent allows the model to use a python interpreter to solve complex problems
|
| 19 |
-
self.agent = CodeAgent(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
print("Smolagents CodeAgent initialized.")
|
| 21 |
|
| 22 |
def __call__(self, question: str) -> str:
|
|
|
|
| 14 |
# ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
|
| 15 |
class BasicAgent:
|
| 16 |
def __init__(self):
|
| 17 |
+
self.model = HfApiModel(max_tokens=2096, temperature=0.5, model_id='Qwen/Qwen2.5-Coder-32B-Instruct', custom_role_conversions=None,)
|
| 18 |
# CodeAgent allows the model to use a python interpreter to solve complex problems
|
| 19 |
+
self.agent = CodeAgent(
|
| 20 |
+
model=self.model,
|
| 21 |
+
tools=[], ## add your tools here (don't remove final answer)
|
| 22 |
+
max_steps=6,
|
| 23 |
+
verbosity_level=1,
|
| 24 |
+
grammar=None,
|
| 25 |
+
planning_interval=None,
|
| 26 |
+
name=None,
|
| 27 |
+
description=None,
|
| 28 |
+
prompt_templates=prompt_templates
|
| 29 |
+
)
|
| 30 |
print("Smolagents CodeAgent initialized.")
|
| 31 |
|
| 32 |
def __call__(self, question: str) -> str:
|