--- title: OCR Reader emoji: 🔍 colorFrom: blue colorTo: purple sdk: static pinned: false license: mit short_description: "Upload printed text and see what the AI reads from it." --- # OCR Reader Upload a picture of printed text and see the text the AI reads from it. ## About this app This web app takes an image of a single line of printed text and reads it, giving you the text back so you can copy it. The AI model runs inside your own browser, so your image is not sent to any server. ## How to use it 1. Wait for the message "Model ready". 2. Click the box (or drop an image) and choose a picture of one line of printed text. 3. Click **Read text**. 4. Read the result, or click **Copy text**. ## Model used [Xenova/trocr-small-printed](https://huggingface.co/Xenova/trocr-small-printed) This is the browser-ready (ONNX) version of Microsoft's `trocr-small-printed`. It runs with Transformers.js, so no API token is needed. ## Why I chose this model - It is made to read printed text, which is the OCR job. - It is small, so it can load in a browser. - It is already converted for Transformers.js, which a Static Space needs. - Because it runs in the browser, my Space contains no secret keys. ## Test results | Input | What the app read | Correct? | |---|---|---| | (write your first image here) | | | | (write your second image here) | | | | (an image you expect it to get wrong, for example a full page with many lines) | | | ## Limitations - This model only recognizes text. It does not find where the text is, so it works best on an image cropped to one line. - Images with many lines, a messy background or handwriting will give poor results. - It works best on clear, printed English text.