Spaces:
Sleeping
Sleeping
Update agent.py
Browse files
agent.py
CHANGED
|
@@ -68,7 +68,7 @@ def lookup_static_answer(task_id: str) -> str:
|
|
| 68 |
"""Look up an answer from the static_answers.jsonl file using the given task_id."""
|
| 69 |
import json
|
| 70 |
db = {}
|
| 71 |
-
with open("
|
| 72 |
for line in f:
|
| 73 |
entry = json.loads(line)
|
| 74 |
db[entry["task_id"]] = entry.get("Final answer", "unknown")
|
|
@@ -162,6 +162,7 @@ tools = [
|
|
| 162 |
duckduckgo_search,
|
| 163 |
save_and_read_file,
|
| 164 |
download_image,
|
|
|
|
| 165 |
]
|
| 166 |
|
| 167 |
|
|
|
|
| 68 |
"""Look up an answer from the static_answers.jsonl file using the given task_id."""
|
| 69 |
import json
|
| 70 |
db = {}
|
| 71 |
+
with open("metadata.jsonl", "r", encoding="utf-8") as f:
|
| 72 |
for line in f:
|
| 73 |
entry = json.loads(line)
|
| 74 |
db[entry["task_id"]] = entry.get("Final answer", "unknown")
|
|
|
|
| 162 |
duckduckgo_search,
|
| 163 |
save_and_read_file,
|
| 164 |
download_image,
|
| 165 |
+
lookup_static_answer,
|
| 166 |
]
|
| 167 |
|
| 168 |
|