|
|
--- |
|
|
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**: |
|
|
```bash |
|
|
git clone https://huggingface.co/spaces/AbhavBhanot/Indian-Mythology-Chatbot |
|
|
cd Indian-Mythology-Chatbot |
|
|
``` |
|
|
|
|
|
2. **Install dependencies**: |
|
|
```bash |
|
|
pip install -r requirements.txt |
|
|
``` |
|
|
|
|
|
3. **Run the application**: |
|
|
```bash |
|
|
python backend/main.py |
|
|
``` |
|
|
|
|
|
4. **Access the API**: |
|
|
- Main API: http://localhost:8000 |
|
|
- Interactive Docs: http://localhost:8000/docs |
|
|
- Health Check: http://localhost:8000/health |
|
|
|
|
|
## π 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](LICENSE) file for details. |
|
|
|
|
|
--- |
|
|
|
|
|
**Built with β€οΈ for spiritual seekers and knowledge enthusiasts** |