metadata
title: Bhagwad Gita RAG Chatbot
emoji: ποΈ
colorFrom: purple
colorTo: indigo
sdk: docker
app_port: 7860
ποΈ Bhagwad Gita RAG Chatbot
An intelligent chatbot that provides wisdom from the Bhagavad Gita and Patanjali Yoga Sutras using advanced RAG (Retrieval Augmented Generation) technology.
π Features
- Sacred Text Querying: Ask questions and get relevant verses from Bhagavad Gita and Patanjali Yoga Sutras
- Intelligent RAG: Uses TF-IDF and cosine similarity for accurate verse matching
- Automatic Summaries: Get concise explanations of complex spiritual concepts
- Bilingual Support: Sanskrit and English language support
- Interactive API: Full REST API with Swagger documentation
π Quick Start
Clone the repository:
git clone https://huggingface.co/spaces/AbhavBhanot/Indian-Mythology-Chatbot cd Indian-Mythology-ChatbotInstall dependencies:
pip install -r requirements.txtRun the application:
python backend/main.pyAccess the API:
- Main API: http://localhost:8000
- Interactive Docs: http://localhost:8000/docs
- Health Check: http://localhost:8000/health
π API Endpoints
GET /- Main landing pageGET /health- Health checkPOST /query- Process spiritual queriesGET /sources- Get available text sourcesPOST /translate- Translate text between languagesGET /supported-languages- List supported languages
π³ Docker Deployment
This project is configured for deployment on Hugging Face Spaces using Docker. The Dockerfile automatically:
- Sets up the Python environment
- Installs all dependencies
- Configures the FastAPI application
- Exposes the service on port 7860
π§ Configuration
Set these environment variables for customization:
DATA_DIR: Path to dataset directoryCORS_ORIGINS: Allowed CORS originsAPI_HOST: API host (default: 0.0.0.0)API_PORT: API port (default: 8000)
π Dataset Structure
The chatbot uses structured CSV datasets containing:
- Bhagavad Gita verses in Sanskrit and English
- Patanjali Yoga Sutras
- Word meanings and translations
- Question-answer pairs for training
π€ Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
π License
This project is licensed under the MIT License - see the LICENSE file for details.
Built with β€οΈ for spiritual seekers and knowledge enthusiasts