Skip to content

iiakshat/IPC-QS-Pinecone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Indian Penal Code (IPC) Query System Implementation Using Pinecone 🍍

This poject leverages the power of Pinecone, a vector database, to efficiently retrieve information related to the Indian Penal Code (IPC) sections.

Table of Contents

Introduction

The IPC Query System is developed to facilitate easy access to legal information contained within the Indian Penal Code. By utilizing Pinecone's vector database, the system ensures quick and precise retrieval of sections based on user queries.

Features

  • Efficient querying of IPC sections
  • High accuracy in retrieving relevant legal information
  • Fast search capabilities using Pinecone's vector database

Technologies Used

  • Python
  • Pinecone VectorDB
  • Hugging Face APIs
  • Embeddings: E5 (Small)

Installation

  1. Clone the repository:
    git clone https://github.com/yourusername/ipc-query-system.git
  2. Install the required dependencies:
    pip install -r requirements.txt

Usage

  1. View the IPC data by parsing the provided PDF:

    • Download the PDF from IPC 1860.
    • Use a PDF parsing library (e.g., PyMuPDF, pdfminer), I have used PyPDFDirectoryLoader from langchain's document_loaders.
  2. Index the IPC data into Pinecone:

    import pinecone
    pc = pinecone.Pinecone(api_key=PC_KEY)
    index_name = "<index-name>"
    index = pc.Index(index_name)
  3. Start the query system:

    streamlit app.py
  4. Access the system via your web browser at http://localhost:5000.

  5. Enter your query in the search bar to retrieve relevant IPC sections.

Data Source

The data for this project is sourced from the Indian Penal Code (IPC) document available at IPC 1860 PDF.

Contributing

Contributions are welcome! Please fork the repository and submit a pull request for review.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

For any queries or suggestions, please contact:


Thank you for using the IPC Query System!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published