Skip to content

Local AI OCR v1.5

Choose a tag to compare

@th1nhhdk th1nhhdk released this 24 Nov 16:59
· 50 commits to master since this release
ed71af1
Release v1.5 with automated setup and simplified model architecture

This commit marks a significant release (tagged v1.5) which
introduces a fully automated bootstrapping workflow and streamlines the
application to enforce a single, optimized model configuration.

Build System and Environment:
    - Add `env_setup.bat`: A comprehensive setup script that:
      - Downloads and extracts Python 3.13.9 (Embeddable).
      - Configures `python313._pth` to allow `import site`.
      - Bootstraps `pip` and installs dependencies from `requirements.txt`.
      - Downloads and silently installs Ollama.
      - Sanitizes the installation (removes shortcuts, cleans User PATH).
      - Automatically pulls the `deepseek-ocr:3b` model.
    - Add `bin/wget.exe`: Binary dependency required by `env_setup.bat`.
    - Add `requirements.txt`: Pin versions for `pyside6`, `ollama`,
      `pillow`, and `pymupdf`.
    - Remove `del_fp16_model.bat` and `get_fp16_model.bat`: These manual
      management scripts are superseded by the automated setup.
    - Update `.gitignore`: Add exclusions for build artifacts (`python.zip`,
      `OllamaSetup.exe`, `get-pip.py`) and `bin/.wget-hsts`.
    - Update `run.bat` and `run_cpu-only.bat`: Remove the `OLLAMA_KEEP_ALIVE`
      environment variable override.

Core Logic:
    - Update `src/constants.py`:
      - Bump `APP_VERSION` to "v1.5".
      - Define `DEFAULT_MODEL` as "deepseek-ocr:3b".
      - Add translation keys for the new "Unload AI Model" feature.
      - Refine HTML formatting in warning messages.
    - Update `src/main.py`:
      - Update `AppUserModelID` to `th1nhhdk.localaiocr.1.5`.
      - Explicitly append `src/` to `sys.path` to ensure module resolution
        in the embeddable Python environment.

User Interface:
    - Update `src/gui.py`:
      - Remove `fetch_models()` and the dynamic Model Selector ComboBox.
      - Remove the "Model Info" button and associated logic.
      - Add "Unload AI Model" button to the top toolbar.
      - Implement `unload_model()`: logic to check `client.ps()` and
        unload the model via a zero-keep-alive request (synchronous).
      - Update main window title to include `APP_VERSION`.
      - Add `src/icon.ico`.

Documentation:
    - Update `README.md`:
      - Update header title to `Local AI OCR (v1.5)`
      - Rewrite feature list, system requirements, and setup guide to
        reflect the new automated workflow and model behavior.
    - Update `README_dev.md`: Update tech stack info and setup steps.

Maintenance:
    - `src/file_handler.py`, `src/style.qss`, `src/worker.py`: Perform
      minor whitespace cleanup and formatting adjustments.