-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
38 lines (30 loc) · 1.18 KB
/
Copy pathmain.py
File metadata and controls
38 lines (30 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
from __future__ import annotations
import argparse
from pathlib import Path
from evidence_review.io_utils import default_repo_root
from evidence_review.pipeline import run
from evidence_review.validation import validate_output_rows
def parse_args() -> argparse.Namespace:
repo_root = default_repo_root(__file__)
parser = argparse.ArgumentParser(description="Run the multimodal evidence review agent.")
parser.add_argument("--dataset-dir", type=Path, default=repo_root / "dataset")
parser.add_argument("--input", type=Path, default=repo_root / "dataset" / "claims.csv")
parser.add_argument("--output", type=Path, default=repo_root / "output.csv")
parser.add_argument(
"--vision-cache",
type=Path,
default=Path(__file__).resolve().parent / "config" / "vision_observations.json",
)
return parser.parse_args()
def main() -> None:
args = parse_args()
rows = run(
input_path=args.input,
output_path=args.output,
dataset_dir=args.dataset_dir,
cache_path=args.vision_cache,
)
validate_output_rows(rows)
print(f"Wrote {len(rows)} predictions to {args.output}")
if __name__ == "__main__":
main()