AbhavBhanot's picture
production deployment
66aa30c verified
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

  1. Clone the repository:

    git clone https://huggingface.co/spaces/AbhavBhanot/Indian-Mythology-Chatbot
    cd Indian-Mythology-Chatbot
    
  2. Install dependencies:

    pip install -r requirements.txt
    
  3. Run the application:

    python backend/main.py
    
  4. Access the API:

πŸ“š API Endpoints

  • GET / - Main landing page
  • GET /health - Health check
  • POST /query - Process spiritual queries
  • GET /sources - Get available text sources
  • POST /translate - Translate text between languages
  • GET /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 directory
  • CORS_ORIGINS: Allowed CORS origins
  • API_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