Logo Lanfrica

phettler/kinyarwanda-translation-tool

Domain:

natural language processing
Creator:
phe
Host:
A local web tool for translating documents progressively using Gemini # SimplyMobilizing Translation Tool A full-stack document translation application with a React frontend and FastAPI backend, using Google's Gemini API for translations. ## Prerequisites - Python 3.10+ - Node.js 18+ - Google Gemini API key ## Quick Start (Windows) ```powershell # 1. Create .env file with your Gemini API key echo "GEMINI_API_KEY=your_key_here" > .env # 2. Run setup (installs all dependencies) .\setup.ps1 # 3. Start the application .\start.ps1 ``` ## Manual Setup ### 1. Environment Variables Create a `.env` file in the project root: ``` GEMINI_API_KEY=your_gemini_api_key_here ``` ### 2. Backend Setup ```bash cd translation-tool/backend # Create virtual environment (recommended) python -m venv venv venv\Scripts\activate # Windows # source venv/bin/activate # Linux/Mac # Install dependencies pip install -r requirements.txt ``` ### 3. Frontend Setup ```bash cd translation-tool/frontend # Install dependencies npm install ``` ## Running the Application **Windows (Easy):** `.\start.ps1` **Manual:** ### Start Backend (Terminal 1) ```bash cd translation-tool/backend python run.py ``` Backend runs at: 127.0.0.1 ### Start Frontend (Terminal 2) ```bash cd translation-tool/frontend npm run dev ``` Frontend runs at: localhost ## Usage 1. Open localhost in your browser 2. Upload a document (.docx) 3. Review extracted segments 4. Translate segments using Gemini AI 5. Export the translated document ## Tech Stack - **Frontend:** React 19, TypeScript, Vite, TanStack Query - **Backend:** FastAPI, SQLite, python-docx - **AI:** Google Gemini 2.0 Flash