Spaces:
Running on Zero
Running on Zero
Commit History
-
Fit short_description to the Hub limit, and test for it
Sanidhya RaviThe Space push was rejected: short_description was 66 characters and the Hub caps it at 60. That validation runs in a pre-receive hook, so it does not fail at build time -- it rejects the push after CI has run and the token has authenticated, which is a slow way to find a typo. test_space_metadata.py now checks the Space front matter and the sync workflow locally: the description length, the keys the Hub requires, that app_file exists, that python_version is one ZeroGPU actually ships, that the workflow still uses HEAD:main and a supported checkout, and that no token is hardcoded. Verified the length check reproduces the real rejection before fixing it.d155184 -
Turn the TrOCR demo into an agentic document pipeline
Sanidhya RaviThe Space did not run. `from_pretrained(".")` loads weights from the repo root, but no model files were ever committed -- git history shows only .gitattributes, README.md, app.py and requirements.txt, and the live Space holds the same four. It crashed on boot. TrOCR now loads from the Hub. Beyond that fix, the demo becomes an agent: drop in any document, optionally say what you want, and it works out what the document is, reads it with the right model, and writes the structured output that suits it -- a spreadsheet for tabular data, JSON for a form, a summary PDF for prose. The same tools are published over MCP so external agents can call the Space directly. Pipeline: ingest -> read -> classify -> tables -> route or plan -> export. * ingest.py takes images, multi-frame TIFF, HEIC, PDF, DOCX, PPTX, XLSX, text and ZIP. pypdfium2 bundles its own PDFium, so no poppler/packages.txt. * Pages arriving with a text layer are used as-is and never reach the GPU. * router.py settles unambiguo…5eb40dc