Skip to content

A RAG based Generative AI Attorney fed with Indian Penal Code data. Developed using Streamlit, LangChain and TogetherAI API.

Notifications You must be signed in to change notification settings

harshitv804/LawGPT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LawGPT - RAG based Generative AI Attorney Chatbot

Know Your Rights! Better Citizen, Better Nation!

About The Project

LawGPT is a RAG based generative AI attorney chatbot that is trained using Indian Penal Code data. This project was developed using Streamlit LangChain and TogetherAI API for the LLM. Ask any questions to the attorney and it will give you the right justice as per the IPC. Are you a noob in knowing your rights? then this is for you!


lawgpt.mp4

Check out the live demo on Hugging Face

Getting Started

1. Clone the repository:

  • git clone https://github.com/harshitv804/LawGPT.git
    

2. Install necessary packages:

  • pip install -r requirements.txt
    

3. Run the ingest.py file, preferably on kaggle or colab for faster embeddings processing and then download the ipc_vector_db from the output folder and save it locally.

4. Sign up with Together AI today and get $25 worth of free credit! 🎉 Whether you choose to use it for a short-term project or opt for a long-term commitment, Together AI offers cost-effective solutions compared to the OpenAI API. 🚀 You also have the flexibility to explore other Language Models (LLMs) or APIs if you prefer. For a comprehensive list of options, check out this link: python.langchain.com/docs/integrations/llms . Once signed up, seamlessly integrate Together AI into your Python environment by setting the API Key as an environment variable. 💻✨

  •  os.environ["TOGETHER_API_KEY"] = "YOUR_TOGETHER_API_KEY"`
    
  • If you are going to host it in streamlit, huggingface or other...
    • Save it in the secrets variable provided by the hosting with the name TOGETHER_API_KEY and key as YOUR_TOGETHER_API_KEY.

5. To run the app.py file, open the CMD Terminal and and type streamlit run FULL_FILE_PATH_OF_APP.PY.

Contact

If you have any questions or feedback, please raise an github issue.

About

A RAG based Generative AI Attorney fed with Indian Penal Code data. Developed using Streamlit, LangChain and TogetherAI API.

Topics

Resources

Stars

Watchers

Forks

Languages