A high-performance translation API leveraging Gemma 2B via Groq's LPUs for sub-second translations, managed with LangChain and served via FastAPI.
- Lightning-fast translations (<1s latency) using Groq's inference API
- LangChain pipeline for prompt templating and model management
- Multi-language support with state-of-the-art LLM translation
- Production-ready API built with FastAPI (async support)
- Simple integration via clean REST endpoints
- Backend: FastAPI (Python)
- AI Pipeline: LangChain
- LLM: Gemma 2B (via Groq)
- Hardware Acceleration: Groq LPUs
- Clone the repository:
git clone https://github.com/falakrana/TextTranslationLangchain.git cd TextTranslationLangchain - Install dependencies:
pip install -r requirements.txt
- Add your API key in .env file.
- Run with:
python app.py
API will be available at http://127.0.0.1:8000
Interactive docs available at:
- http://localhost:8000/docs (Swagger)
- http://localhost:8000/redoc (ReDoc)