Spaces:
Sleeping
Sleeping
Update agent.py
Browse files
agent.py
CHANGED
|
@@ -22,7 +22,7 @@ def modulus(a: int, b: int) -> int:
|
|
| 22 |
search_tool=DuckDuckGoSearchTool()
|
| 23 |
|
| 24 |
#=======Agent========#
|
| 25 |
-
model = InferenceClientModel()
|
| 26 |
agent = CodeAgent(
|
| 27 |
tools=[
|
| 28 |
multiply,
|
|
@@ -34,13 +34,4 @@ agent = CodeAgent(
|
|
| 34 |
model = model,
|
| 35 |
add_base_tools=True,
|
| 36 |
planning_interval=3
|
| 37 |
-
)
|
| 38 |
-
with open("Q20.json", "r") as f:
|
| 39 |
-
tasks = json.load(f)
|
| 40 |
-
|
| 41 |
-
for task in tasks:
|
| 42 |
-
task_id = task["task_id"]
|
| 43 |
-
question = task["question"]
|
| 44 |
-
file_name = task["file_name"]
|
| 45 |
-
answer = agent.run(question)
|
| 46 |
-
print(f"task_id: {task_id},submitted_answer: {answer}")
|
|
|
|
| 22 |
search_tool=DuckDuckGoSearchTool()
|
| 23 |
|
| 24 |
#=======Agent========#
|
| 25 |
+
model = InferenceClientModel(“Qwen/Qwen2.5-Coder-32B-Instruct”)
|
| 26 |
agent = CodeAgent(
|
| 27 |
tools=[
|
| 28 |
multiply,
|
|
|
|
| 34 |
model = model,
|
| 35 |
add_base_tools=True,
|
| 36 |
planning_interval=3
|
| 37 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|