Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

BharatLAW: A legal advisory chatbot designed to assist users by providing information and guidance based on the Indian Penal Code. This tool combines FAISS vector databases for efficient data retrieval and Streamlit for a user-friendly interface, offering an educational resource to help understand legal queries.

NotificationsYou must be signed in to change notification settings

Nike-one/BharatLAW

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BharatLAW is a sophisticated legal advisory chatbot focused on providing detailed and contextually accurate responses about the Indian Penal Code. It utilizes a powerful combination of machine learning technologies to efficiently process and retrieve legal information.


Features 🌟

  • Document Ingestion: Automated processing of text documents to store legal information in a FAISS vector database.
  • Real-Time Interaction: Real-time legal advice through a conversational interface built with Streamlit.
  • Legal Prompt Templating: Structured prompt format ensuring clarity, detail, and legal accuracy in responses.


🚀Blast off to discovery! Our project is waiting for youBharatLAW. Explore it today and elevate your understanding!🌟



Components 🛠️

Ingestion Script (Ingest.py)

FunctionalityDescription
Document LoadingLoads text documents from a specified directory.
Text SplittingSplits documents into manageable chunks for processing.
Embedding GenerationUtilizesHuggingFace's InLegalBERT to generate text embeddings.
FAISS DatabaseIndexes embeddings for fast and efficient retrieval.

Web Application (app.py)

FeatureDescription
Streamlit InterfaceProvides a web interface for user interaction.
Chat FunctionalityManages conversational flow and stores chat history.
Legal Information RetrievalLeverages FAISS index to fetch pertinent legal information based on queries.

Setup 📦

Prerequisites

  • Python 3.8 or later
  • ray
  • langchain
  • streamlit
  • faiss

Installation

  1. Clone the repository:
    git clone https://github.com/your-repo/BharatLAW.gitcd BharatLAW
  2. Install dependencies:
     pip install -r requirements.txt
  3. Set up the Together AI API Key:Obtain an API key fromTogether AI. 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. 🚀 

    > To set this API key as an environment variable on any OS, you can use the following approach:
  • On macOS and Linux:
    echo"export TOGETHER_API_KEY='Your-API-Key-Here'">>~/.bash_profilesource~/.bash_profile
  • On Windows (using Command Prompt):
    setx TOGETHER_API_KEY"Your-API-Key-Here"
  • On Windows (using PowerShell):
    [Environment]::SetEnvironmentVariable("TOGETHER_API_KEY","Your-API-Key-Here","User")

This key is crucial for the chatbot to access language model functionalities provided by Together AI.

Running the Application

  1. Run the ingestion script to prepare the data:
    python ingest.py
  2. Launch the Streamlit application:
    streamlit run app.py

Usage 🔍

Navigate to the local URL provided by Streamlit to interact with the BharatLAW chatbot. Enter your legal queries and receive precise information derived from the indexed legal documents. Utilize the chat interface to engage in a legal discussion and get accurate advice.

About

BharatLAW: A legal advisory chatbot designed to assist users by providing information and guidance based on the Indian Penal Code. This tool combines FAISS vector databases for efficient data retrieval and Streamlit for a user-friendly interface, offering an educational resource to help understand legal queries.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp