xiaomi-research/Xiaomi-OCR-0 ? reverse-engineered prompt
Reverse engineered prompt
Build me a local app for Xiaomi OCR 0 that can take a PDF or document image and turn it into clean Markdown, with tables rendered nicely and formulas kept in LaTeX. I also want a mode for extracting specific fields into JSON, plus a simple question answering mode for asking things about the text in the image. Include a browser based demo so I can upload a page or a cropped region and see the result right away.
Make it work as a local setup using the model running on my machine, and include the helper flow for preparing PDFs and images, handling page level and region level parsing, and assembling the final output. If region parsing depends on extra layout tools, support that too and fall back gracefully if my machine cannot run it. Look up current docs online if you need to, and make the setup as easy as possible for someone just trying to run it locally.
Are you gonna build this?
make sure you review the code using coderabbit