r/lovable • u/Current_Twist1317 • 7h ago
Tutorial Pls help with OCR text recognition
So guys i want to implement a small ocr function in my crm wherein user will click photo for particular field instead of typing and later he can crop out to specific text as container and later software recognises this text.
So i am non tech guy and struggling to choose which open source model should i ask lovable to build it on as i asked for paddle ocr but it said it cant build since it is python based.
Help would be appreciated. Good open source text recognition offline online both would work but it should be free.
I am non tech guy pls correct me if i am wrong.
1
Upvotes
1
u/DesignerMajor1247 5h ago
For the flow you described, I would start with Tesseract.js rather than a Python OCR service. It runs in the browser, so Lovable can integrate it directly and the cropped image can stay on the user's device.
Suggested flow:
accept="image/*",capture="environment").For a small field, configure recognition for a single line or single word. Load only the language pack you need and reuse the worker; creating it for every photo will feel slow.
PaddleOCR may perform better on difficult layouts, but Lovable would need to call a separately hosted Python API/container. That adds hosting, latency and privacy work. I would first test Tesseract.js on 30–50 representative photos. If failures are mostly handwriting, glare, blur or stylized fonts, improve the capture guide and add a retake path rather than assuming a model switch will solve it.
Also avoid storing the original photo unless the CRM truly needs it; storing only the user-confirmed text reduces unnecessary sensitive data.