This project is a Chrome Extension that communicates with a locally running FastAPI backend to translate text using the Gemini AI model. The extension captures user-selected text → sends it to your Python server → receives the translation → displays it instantly.
- Select text on any webpage and translate it immediately through the popup interface.
- Automatically expands abbreviations to full English phrases before translating.
- Retrieves a list of common translation languages from the backend.
- Uses Google Gemini Flash Lite for accurate, AI-powered translation.
- Gemini API key
- Python 3.13+
fastapiis web framework for building the APIuvicornis ASGI server for running FastAPIpython-dotenvfor loading environment variablesgoogle-generativeaiis SDK for interacting with Google's Generative AI models
Install dependencies:
pip install fastapi
pip install uvicorn
pip install python-dotenv
pip install google-generativeai- Open Chrome
- Go to: chrome://extensions/
- Enable Developer Mode (top-right toggle)
- Click Load unpacked
- Select the front-end/ folder
Open a terminal in the project root directory and run:
python sv.pyThe server will start at: http://127.0.0.1:8000