Logo Lanfrica

myltiplex1/ChoralMind

Domain:

natural language processing

Record type:

software
Creator:
myl
Host:
A bilingual (English & Yoruba) hymn search bot using embeddings, FAISS, Telegram and gradio for quick lyric-based lookup. # 🎢 ChoralMind – Hymn Search Bot ChoralMind is a Telegram bot that helps you search and retrieve **English** and **Yoruba** hymns using semantic search with FAISS embeddings. Try here: ChoralMind or here: ChoralMind ## πŸ“Œ Features - Search hymns in **English** and **Yoruba** by typing any line from the hymn. - Retrieves relevant hymns using **Google Generative AI embeddings** (`models/text-embedding-004`). - Supports multilingual hymn databases with separate FAISS indexes. - Interactive **language selection** via Telegram inline buttons. - Logs all bot activity for debugging and analytics. - Maintains `hymn_id` mapping so results link back to the full hymn text. ## πŸ›  Tech Stack - **Python 3.12** - python-telegram-bot - LangChain for text chunking and FAISS vector storage - Google Generative AI API for embeddings - FAISS for similarity search - pdfplumber for PDF hymn extraction - Gradio for interactive web interface ## πŸ“‚ Project Structure ``` β”œβ”€β”€ docs/ # hymns PDF source β”œβ”€β”€ data/ # Extracted hymns in JSON β”œβ”€β”€ embeddings/ # embedding scripts and FAISS Index β”œβ”€β”€ retriever/ β”‚ └── retriever.py # HymnRetriever class β”œβ”€β”€ llm/ β”‚ └── generate_response.py # Formats retrieved results into Telegram reply β”œβ”€β”€ telegran_bot # Telegram bot entrypoint β”‚ └── bot.py β”œβ”€β”€ main.py # main program β”œβ”€β”€ requirements.txt # Python dependencies |── gradio_app.py # interactive web interface ``` ## βš™οΈ Installation **Clone the repository** ```bash git clone github.com cd ChoralMind ``` ## πŸ“¦ Create and Activate a Virtual Environment ```bash python -m venv venv source venv/bin/activate # Linux/Mac venv\Scripts\activate # Windows ``` ## πŸ“₯ Install Dependencies ```bash pip install -r requirements.txt ``` ## βš™οΈ Set Up Environment Variables Create a `.env` file: ```ini TELEGRAM_BOT_TOKEN=your_telegram_bot_token GEMINI_API_KEY=your_google_generative_ai_key ``` --- ## πŸ“œ …

Languages

Licenses