parjun's picture
Update README.md
c8e147b verified

A newer version of the Gradio SDK is available: 5.44.1

Upgrade
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

  1. Enter your Groq API key in the input box
  2. Ask a question โ€” spiritual, philosophical, or general
  3. View the AIโ€™s response and full conversation history
  4. 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