Spaces:
Running on Zero
Running on Zero
File size: 622 Bytes
db06ffa | 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 | """Parse one PDF with the MVP pipeline."""
from __future__ import annotations
import argparse
from zsgdp import parse_document
def main() -> int:
parser = argparse.ArgumentParser()
parser.add_argument("input")
parser.add_argument("output")
args = parser.parse_args()
parsed = parse_document(args.input, args.output)
print(
f"score={parsed.quality_report.score:.2f} "
f"elements={len(parsed.elements)} tables={len(parsed.tables)} "
f"figures={len(parsed.figures)} chunks={len(parsed.chunks)}"
)
return 0
if __name__ == "__main__":
raise SystemExit(main())
|