Skip to main content

A simple, private, and offline medical translation tool.

Project description

MediTranslate:

MediTranslate is a private, offline-first medical translation tool designed to help patients understand complex medical documents.

It combines local machine translation (for privacy) with cloud-based AI (for simplification), allowing users to scan documents, translate them into their native language, and get simple, jargon-free explanations.


Features:

  • Privacy First: OCR and Translation run entirely offline on your device. No patient data leaves your computer during the basic translation process.
  • OCR: Auto-detects text from scanned PDFs or images using Tesseract and OpenCV.
  • Hybrid AI:
    • Local: Uses MarianMT (Transformers) for accurate, private translation.
    • Cloud (Optional): Uses Google Gemini to "explain like I'm 5" for difficult medical terms (requires API key).
  • Medical Glossary: Built-in database of 70,000+ medical terms and ICD-10 codes.
  • Cross-Platform: Works on Windows, macOS, and Linux.

When the user runs the app, it will do the following before runtime:

  1. check for models in the resources/models directory. If they are not found, it will download them.
  2. load glossaries and read the JSON files.
  3. check API key in the .env file on root directory. If it is not found, it will prompt the user to manually enter it.

Installation:

Windows:

Step 1: Install Tesseract OCR:

  1. Download the installer from the Tesseract Wiki.
  2. Run the installer.
  3. CRITICAL: During installation, you will see an option for language data. Ensure you check the boxes for languages you plan to scan (e.g., Spanish, Hindi).
  4. CRITICAL: Once installed, you must add Tesseract to your System PATH:
    • Press Win key, type "Edit the system environment variables", and hit Enter.
    • Click the "Environment Variables" button.
    • Under "System variables" (bottom box), find the row named "Path" and double-click it.
    • Click "New" and paste this path: C:\Program Files\Tesseract-OCR
    • Click OK on all windows.

Step 2: Install uv:

  1. Open PowerShell.
  2. Paste this command and press Enter:
    powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
    
  3. Close PowerShell and open it again to refresh.

Step 3: Install MediTranslate

  1. In the new PowerShell window, run:
    uv tool install meditranslate
    
  2. Once finished, you can run the app by typing:
    meditranslate
    

macOS:

Step 1: Install Homebrew (if you haven't already):

  1. Open Terminal.
  2. Paste this and hit Enter (follow the prompts on screen):
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    

Step 2: Install Tesseract

  1. In the Terminal, run:
    brew install tesseract
    brew install tesseract-lang
    

Step 3: Install uv:

  1. Install uv:
    curl -LsSf https://astral.sh/uv/install.sh | sh
    
  2. Close your Terminal and open a new one.
  3. Install the app:
    uv tool install meditranslate
    
  4. Run it:
    meditranslate
    

Linux (Debian/Ubuntu):

Step 1: Install Dependencies:

  1. Open Terminal.
  2. Run the following commands:
    sudo apt-get update
    sudo apt-get install -y tesseract-ocr tesseract-ocr-all libgl1
    

Step 2: Install uv:

  1. Paste this command into your terminal and hit Enter:
    curl -LsSf https://astral.sh/uv/install.sh | sh
    
  2. Close your terminal window and open a new one

Step 3: Install MediTranslate

  1. In the new terminal window, run:
    uv tool install meditranslate
    
  2. Once finished, you can run the app by typing:
    meditranslate
    

Linux (Arch/Manjaro):

Step 1: Install Dependencies:

  1. Open Terminal.
  2. Run the following command (installs Tesseract, language data, and graphics libraries):
    sudo pacman -Syu tesseract tesseract-data-eng tesseract-data-spa tesseract-data-hin libglvnd
    

Step 2: Install uv:

  1. Arch Linux includes uv in the official repositories. Run this command:
    sudo pacman -S uv
    
  2. Close your terminal window and open a new one

Step 3: Install MediTranslate

  1. In the new terminal window, run:
    uv tool install meditranslate
    
  2. Once finished, you can run the app by typing:
    meditranslate
    

AI Assistant

Step 1: Get API Key

  1. Go to Google AI Studio and sign in.
  2. Click on "Create API Key".
  3. Name your key, then name your project (create a new one).
  4. Create a .env file in your root directory (not project root).
  5. Add the API key to the .env file:
    GEMINI_API_KEY=your_api_key_here
    

Uninstalling

If you wish to remove MediTranslate from your system, follow these steps:

1. Remove the Application

Run this command in your Terminal or PowerShell to uninstall the tool:

uv tool uninstall meditranslate

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

meditranslate-1.0.3.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

meditranslate-1.0.3-py3-none-any.whl (1.0 MB view details)

Uploaded Python 3

File details

Details for the file meditranslate-1.0.3.tar.gz.

File metadata

  • Download URL: meditranslate-1.0.3.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for meditranslate-1.0.3.tar.gz
Algorithm Hash digest
SHA256 689eb10d72350824fdd44509ec099cbd965db2a3dc0733007d7201fa8fc3f366
MD5 8675997bc5d44cb4815165a3a953efd2
BLAKE2b-256 2c61c909eb3ada9b95397bbea64bc9af8538da87ee339431b77484d08ea8c9ba

See more details on using hashes here.

File details

Details for the file meditranslate-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: meditranslate-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 1.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for meditranslate-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0b6368ece6f45e3fe70ffb0aeb386eb8c9ba2f546a0512f35348a26d2bc981f8
MD5 46965c1b6363f3a5dbbf0dfa1362646a
BLAKE2b-256 3186475947b7ef857814b98a5dc98c5d53fb5237106c974050d2bc9445cb938d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page