A newer version of the Gradio SDK is available:
5.44.1
metadata
title: Gita Assistant Langchain Project
emoji: ๐ป
colorFrom: indigo
colorTo: purple
sdk: gradio
sdk_version: 5.38.0
app_file: app.py
pinned: false
license: mit
short_description: Simple project for Gita Assistance
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
๐๏ธ Gita Assistant โ LangChain Project
A conversational AI chatbot built with Gradio, LangChain, and powered by Groqโs gemma2-9b-it model. This assistant is designed to offer thoughtful, spiritually grounded responses inspired by the Bhagavad Gita, while supporting general-purpose Q&A.
๐ฟ Overview
This chatbot is initialized with a spiritual system role:
โYou are a Spiritual Gita AI assistantโ
It responds to user queries with philosophical depth, contextual awareness, and a calm, devotional tone. Ideal for seekers, learners, and anyone curious about Gita wisdom.
โจ Features
- ๐ง Gita-inspired assistant persona
- ๐ Multi-turn conversation memory
- ๐ Secure API key input via Gradio textbox
- ๐ Expandable chat history with role-based formatting
- โก Powered by Groqโs
gemma2-9b-it
via LangChain - ๐ Hosted on Hugging Face Spaces
๐ ๏ธ Tech Stack
Component | Purpose |
---|---|
Gradio | Web interface for interactive chatbot |
LangChain | Message abstraction and session flow |
langchain-groq | Groq API integration with Gemma model |
Python dotenv | (Optional) local development key loading |
๐ How to Use
- Enter your Groq API key in the input box
- Ask a question โ spiritual, philosophical, or general
- View the AIโs response and full conversation history
- Reflect, explore, or customize the assistantโs role
๐ฆ Local Setup (Optional)
git clone https://huggingface.co/spaces/parjun/Gita_Assistant_Langchain_project
cd Gita_Assistant_Langchain_project
pip install -r requirements.txt
python app.py
๐ Chat History Format
- โ๏ธ System Role โ defines assistantโs personality
- ๐ค User โ your questions and prompts
- ๐ค Bot โ AI-generated responses
๐งช Customization Ideas
- ๐ Add persona switcher (e.g. โGuruโ, โComedianโ, โTherapistโ)
- ๐ Integrate Gita verse embeddings for retrieval-augmented answers
- ๐ Add TTS for voice-based spiritual guidance
- ๐ง Extend with LangChain tools or memory modules
๐ License
Open-source under MIT License