How devgomesai/nexaai-deepseek-ocr works
Project type and purpose
• This is a full-stack OCR application combining a local AI model server (NexaAI + DeepSeek-OCR) with a Chainlit-powered web interface and a command-line API.
• Purpose: extract text from images (local files or URLs) with high accuracy and privacy, offering both interactive web UI and programmatic access.
File structure
• Top-level files:
• app.py – Chainlit web app entry point
• ocr.py – Core OCR logic, OpenAI client integration to NexaAI
• chainlit.md – UI welcome page content
• pyproject.toml & uv.lock – dependency metadata and lock file
• .chainlit/ – Chainlit configuration and translations
• images/ – sample images for testing
• README.md – documentation
• Patterns:
• Separation of concerns: frontend (Chainlit UI in app.py + chainlit.md), backend logic (ocr.py), external service (NexaAI server)
• Configuration files (.chainlit/config.toml, .python-version) and environment specs
Insights from the README
• Architecture described implicitly:
• Local NexaAI server at http://127.0.0.1:18181/v1 serving the DeepSeek model
• Python client (OpenAI library) for API calls
• Chainlit to expose web interface on http://localhost:8000
• Tech stack: Python 3.13+, NexaAI, Chainlit, OpenAI client library, LXML, Pandas
Detailed capture of essential elements
• Don’t omit the translations directory – note it configures multi-language support in the UI
• Chainlit.md welcome page as part of UI content
• Configuration (.chainlit/config.toml) as customizing UI behavior (themes, limits)
• That both web and CLI share the same OCR core (ocr.py)
• Sample images directory as a testing resource