Spaces:
Sleeping
Sleeping
Commit History
-
Disable SSR to fix blank page on Spaces; move theme/css to launch()
ClaudeUnverified signaturegradio 6's server-side rendering fails inside the Hugging Face Space iframe, leaving a blank white page with "Could not resolve app config". Serve the classic client-rendered frontend via ssr_mode=False instead. theme/css move from the Blocks constructor to launch(), where gradio 6 expects them (removes the deprecation warning).556826e -
Replace retired zephyr default with a fallback chain of supported chat models
ClaudeUnverified signatureHuggingFaceH4/zephyr-7b-beta is no longer carried by any Inference Provider (router returns model_not_supported), which broke the chat assistant. chat_update now tries a candidate list in order - an HF_CHAT_MODEL override first, then Qwen2.5-7B-Instruct, Mistral-7B-Instruct-v0.3, and Qwen2.5-72B-Instruct - and the run metadata records whichever model actually served the call (ACTIVE_MODEL) rather than the configured default.7ce911a -
Show HF_TOKEN detection status in Step 1
ClaudeUnverified signatureEvaluated at container startup, so a Space operator can immediately see whether the HF_TOKEN secret reached the process or whether it's missing, misnamed, or awaiting a restart - instead of discovering it via a failed chat call.203d50e -
Pin Space to gradio 6.19.0 to fix startup crash
ClaudeUnverified signaturegradio 5.9.1's API-info generator (gradio_client json_schema_to_python_type) crashes on gr.JSON component schemas with "TypeError: argument of type 'bool' is not iterable", which fails the Space's startup health check ("localhost is not accessible") and exits the container. The app was developed and browser-verified against gradio 6.19.0, where this is fixed, so pin sdk_version (and the local dev floor) to match.9b62d57 -
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 -
Rebrand UI copy and visual style to enterprise document-intelligence positioning
ClaudeUnverified signature- Hero headline/subheadline reframed around "structured business data" rather than raw OCR, matching the company's brand positioning. - Added a small pipeline strip (Upload -> OCR -> AI-Assisted Extraction -> Structured Data -> CSV Export) as a lightweight nod to the product's data lifecycle. - Swapped the indigo/emoji-heavy styling for a more muted blue/slate palette, subtle card shadows, and eyebrow-style step labels; dropped emoji from headings and quick-start buttons in favor of plain professional labels. - Renamed quick-start buttons and results tabs to match enterprise tone (Structured fields / Notifications / Audit trail / Raw OCR output). - Updated README title/intro and step references to match the new single-flow layout and copy. Scope stayed limited to rebranding this existing tool (per user decision) rather than building a separate marketing website - the tool still only covers construction/compliance/finance, no new extraction capabilities were added.bb76929 -
Redesign UI as a single guided flow with a modern, professional theme
ClaudeUnverified signatureReplaces the two-tab layout with one linear page (Step 1: describe what to extract via chat or quick-start buttons -> Step 2: upload multiple PDFs/images -> Step 3: run and review results in tabs), so a business owner can tell the assistant exactly what data it's looking for before uploading documents for review. Adds an indigo Soft theme, card-style sections, and one-click category starting points (Construction/SAP, Compliance, Finance/AR) that pre-fill and send a chat prompt. Manual settings and the HF token field are tucked into collapsed accordions since the chat is now the primary path. Verified the full render and quick-start -> chat interaction in a real browser.9e437ab -
Restructure extraction into tidy tables, scoped fields, and an audit trail
ClaudeUnverified signature- Split output into two tidy (one-fact-per-row) tables instead of one wide sparse CSV: extracted fields and notification hits, plus a third run-metadata CSV documenting the exact settings (categories, keywords, custom fields, match filter, chat model/transcript) that produced the run - a lineage record for auditing why data was or wasn't pulled. - Standard field extraction (PO/SAP/invoice/cert codes) is now scoped to the selected categories via CATEGORY_FIELD_MAP instead of always running every pattern on every document. - Added a generic label->value custom field extractor (extract_custom_fields) so users can name arbitrary fields to pull as data (e.g. "reference number", "gross weight") separate from notification keywords, which only raise a flag. The chat assistant now configures both.1d905fa
-
Add chat assistant to tailor OCR extraction settings conversationally
ClaudeUnverified signatureAdds a chat tab where users describe in plain language what to flag and pull (e.g. "only flag overdue invoices and pull SAP PO numbers"). A Hugging Face-hosted chat model (chat_config.py) parses that into categories/custom keywords/export-filter settings, which drive the same controls used by the Upload & Run tab. Falls back gracefully with a clear message if no HF token is configured, so manual controls still work standalone.a20dd9f -
Add OCR notification/data extractor Gradio app for Hugging Face Spaces
ClaudeUnverified signatureTakes PDF or image uploads, OCRs pages (native PDF text or Tesseract for scans), flags domain notification keywords (construction, compliance, finance), extracts structured fields (PO/SAP/invoice numbers, dates, amounts, cert codes) via regex, and exports results to CSV.2a9e166