Skip to content

prachet283/GenAI-Project-Chat-with-Bhagavad-Gita

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌿 Bhagavad Gita Conversational RAG Chatbot πŸ™

"Whenever dharma declines and the purpose of life is forgotten, I manifest myself on earth." β€” Bhagavad Gita

This project is a GenAI RAG-based chatbot that lets you talk to Lord Krishna himself 🌸.
It uses LangChain, FAISS, and HuggingFace Inference API to provide life guidance from the Bhagavad Gita, with direct verse references.

The UI has a divine Krishna essence 🎨 β€” with peacock feather watermark πŸͺΆ β€” so the experience feels like a spiritual conversation rather than just a Q&A bot.


✨ Features

  • πŸ“– Reference from Bhagavad Gita (PDF source)
  • 🧠 Conversational Memory β†’ Krishna remembers your past questions in the session
  • πŸ”Ž RAG (Retrieval-Augmented Generation) β†’ Accurate answers grounded in scripture
  • 🎨 Aesthetic UI with peacock feather watermark
  • ⚑ Flask Backend + HTML/CSS/JS Frontend
  • 🌐 Deployable on Render/Heroku/Docker

πŸ› οΈ Tech Stack

  • Backend β†’ Flask + LangChain + HuggingFace API
  • Frontend β†’ HTML, CSS, JS (chat-style interface)
  • Vector DB β†’ FAISS (local)
  • PDF Loader β†’ LangChain PyPDFLoader
  • Memory β†’ ConversationBufferMemory

πŸ“‚ Project Structure

πŸ“ BhagavadGita-Chatbot
 │── app.py # Flask backend (RAG + Memory)
 │── requirements.txt # Dependencies
 │── .env # HuggingFace API Key
 │── /templates
 β”‚ └── index.html # Chat UI
 │── /static
 β”‚ β”œβ”€β”€ style.css # Styling
 β”‚ └── script.js # Frontend logic
 │── Bhagavad-gita-As-It-Is-English.pdf # Knowledge source

βš™οΈ Installation

1️⃣ Clone the Repo

git clone https://github.com/your-username/BhagavadGita-Chatbot.git
cd BhagavadGita-Chatbot

2️⃣ Create Virtual Environment (recommended)

python -m venv venv
source venv/bin/activate   # Mac/Linux
venv\Scripts\activate      # Windows

3️⃣ Install Dependencies

pip install -r requirements.txt

4️⃣ Add Environment Variables Create a .env file:

HUGGINGFACEHUB_API_TOKEN=your_api_key_here

5️⃣ Run the App

python app.py

Visit πŸ‘‰ http://127.0.0.1:8080/ in your browser.

Deployment with Docker (Optional)

docker build -t gita-chatbot .
docker run -d -p 5000:5000 --env-file .env gita-chatbot

Future Enhancements

  • Voice-enabled chat with Krishna
  • Support for additional languages (Hindi, Sanskrit, Marathi)
  • Rich mobile experience (PWA)
  • Persistent session storage for multi-user environments

Acknowledgments

  • Bhagavad Gita β€” timeless source of divine wisdom
  • LangChain β€” elegant RAG implementation
  • HuggingFace β€” for inference APIs
  • GitHub & Render β€” for deployment support

About

πŸ’¬ An AI-powered chatbot that brings the wisdom of the Bhagavad Gita to life through natural conversation and verse-based guidance.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published