Spaces:
Sleeping
Sleeping
Commit History
-
Add one-click fictitious sample documents, generated at app startup
ClaudeUnverified signature- sample_docs/generate_samples.py builds three watermarked demo PDFs (construction change order, accounting/tax invoice, bill of lading). Every page carries a "FICTITIOUS DATA - NOT REAL DATA" banner, watermark, and footer. - The PDFs are generated on first launch via ensure_samples() rather than committed - the Hugging Face Hub rejects binary files outside LFS storage, and the documents are deterministic anyway. Falls back to a temp directory if the app dir isn't writable. - The bill of lading is saved as an image-only scanned page (JPEG compressed) so it exercises the real Tesseract OCR path with confidence scores; the other two keep native text layers. - Step 2 gains sample buttons that load the file AND preset matching categories/custom fields, so Run works immediately with no setup. - Hardened extract_custom_fields against OCR'd multi-column forms: captures that are themselves labels (trailing ':' or '#') are skipped instead of recorded as values. - allowed_p…3a6d22d