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.
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.
- Efficient querying of IPC sections
- High accuracy in retrieving relevant legal information
- Fast search capabilities using Pinecone's vector database
- Python
- Pinecone VectorDB
- Hugging Face APIs
- Embeddings: E5 (Small)
- Clone the repository:
git clone https://github.com/yourusername/ipc-query-system.git
- Install the required dependencies:
pip install -r requirements.txt
-
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.
-
Index the IPC data into Pinecone:
import pinecone pc = pinecone.Pinecone(api_key=PC_KEY) index_name = "<index-name>" index = pc.Index(index_name)
-
Start the query system:
streamlit app.py
-
Access the system via your web browser at
http://localhost:5000
. -
Enter your query in the search bar to retrieve relevant IPC sections.
The data for this project is sourced from the Indian Penal Code (IPC) document available at IPC 1860 PDF.
Contributions are welcome! Please fork the repository and submit a pull request for review.
This project is licensed under the MIT License. See the LICENSE file for details.
For any queries or suggestions, please contact:
- Name: Akshat Sanghvi
- Email: jakshat569@gmail.com
- GitHub: iiakshat
- LinkedIn: Akshat Sanghvi
Thank you for using the IPC Query System!