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
-
git clone https://github.com/harshitv804/LawGPT.git
-
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 asYOUR_TOGETHER_API_KEY
.
- Save it in the secrets variable provided by the hosting with the name
5. To run the app.py
file, open the CMD Terminal and and type streamlit run FULL_FILE_PATH_OF_APP.PY
.
If you have any questions or feedback, please raise an github issue.