{"id":50389462,"url":"https://github.com/devspidr/vakil-ai","last_synced_at":"2026-05-30T17:30:42.707Z","repository":{"id":292706543,"uuid":"981500322","full_name":"devspidr/vakil-ai","owner":"devspidr","description":"Vakil-AI is a small milestone in my college megaproject where I'm learning and practicing AI. It serves as a basic legal assistant that simplifies legal terms using NLP and web scraping. Techniques used include LLMs, RAG (Retrieval-Augmented Generation), and data extraction.","archived":false,"fork":false,"pushed_at":"2025-05-11T17:09:20.000Z","size":46907,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-18T11:54:48.681Z","etag":null,"topics":["ai-model","chatbot","llm","rag","web-scraping"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devspidr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-11T08:52:49.000Z","updated_at":"2025-06-14T03:40:08.000Z","dependencies_parsed_at":"2025-05-11T18:33:22.616Z","dependency_job_id":null,"html_url":"https://github.com/devspidr/vakil-ai","commit_stats":null,"previous_names":["soundar3078/vakil-ai","devspidr/vakil-ai"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/devspidr/vakil-ai","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devspidr%2Fvakil-ai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devspidr%2Fvakil-ai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devspidr%2Fvakil-ai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devspidr%2Fvakil-ai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devspidr","download_url":"https://codeload.github.com/devspidr/vakil-ai/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devspidr%2Fvakil-ai/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33703064,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-30T02:00:06.278Z","response_time":92,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-model","chatbot","llm","rag","web-scraping"],"created_at":"2026-05-30T17:30:42.011Z","updated_at":"2026-05-30T17:30:42.675Z","avatar_url":"https://github.com/devspidr.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"#   V.A.K.I.L AI: AI IPC Legal advice Assistant 📘\n\nBharatLAW 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.\n\n---\n\n##   Features 🌟\n\n* **Document Ingestion**:   Automated processing of text documents to store legal information in a FAISS vector database.\n* **Real-Time Interaction**:   Real-time legal advice through a conversational interface built with Streamlit.\n* **Legal Prompt Templating**:   Structured prompt format ensuring clarity, detail, and legal accuracy in responses.\n\n\u003cbr\u003e\n\n---\n\n\u003ch4\u003e\u003cstrong\u003e🚀Blast off to discovery! Our project is waiting for you \u003ca href= \"https://huggingface.co/spaces/nik-one/BharatLAW-IPC_legal_guidance\"\u003eBharatLAW\u003c/a\u003e. Explore it today and elevate your understanding!🌟\u003c/strong\u003e\u003ch4\u003e\n\n\u003cbr\u003e\n\n---\n\n##   Components 🛠️\n\n###   Ingestion Script (`Ingest.py`)\n\n|   Functionality        |   Description                                                                  |\n| :--------------------- | :--------------------------------------------------------------------------- |\n|   **Document Loading** |   Loads text documents from a specified directory.                             |\n|   **Text Splitting** |   Splits documents into manageable chunks for processing.                      |\n|   **Embedding Generation** |   Utilizes `HuggingFace's InLegalBERT` to generate text embeddings.           |\n|   **FAISS Database** |   Indexes embeddings for fast and efficient retrieval.                        |\n\n###   Web Application (`app.py`)\n\n|   Feature               |   Description                                                                                                |\n| :-------------------- | :--------------------------------------------------------------------------------------------------------- |\n|   **Streamlit Interface** |   Provides a web interface for user interaction.                                                             |\n|   **Chat Functionality** |   Manages conversational flow and stores chat history.                                                      |\n|   **Legal Information Retrieval** |   Leverages FAISS index to fetch pertinent legal information based on queries.                           |\n|   **Hugging Face API** |   Integrates with the Hugging Face Inference API to access and query language models for generating responses. |\n\n---\n\n##   Setup 📦\n\n###   Prerequisites\n\n* Python 3.8 or later\n* ray\n* langchain\n* streamlit\n* faiss\n* requests  # Added\n\n###   Installation\n\n1.  **Clone the repository:**\n\n    ```bash\n    git clone [https://github.com/your-repo/BharatLAW.git](https://github.com/your-repo/BharatLAW.git)\n    cd BharatLAW\n    ```\n\n2.  **Install dependencies:**\n\n    ```bash\n    pip install -r requirements.txt\n    ```\n\n3.  **Set up the Hugging Face API Token:**\n\n    Obtain an API token from \u003ca href=\"https://huggingface.co/\"\u003eHugging Face\u003c/a\u003e.\n    You'll need this to authenticate with the Hugging Face Inference API.\n\n    **\u003e   To set this API token as an environment variable, you can use the following approach:**\n\n    * On macOS and Linux:\n\n        ```bash\n        echo \"export HUGGINGFACE_API_TOKEN='Your-HuggingFace-API-Token-Here'\" \u003e\u003e ~/.bash_profile\n        source ~/.bash_profile\n        ```\n\n    * On Windows (using Command Prompt):\n\n        ```cmd\n        setx HUGGINGFACE_API_TOKEN \"Your-HuggingFace-API-Token-Here\"\n        ```\n\n    * On Windows (using PowerShell):\n\n        ```powershell\n        [Environment]::SetEnvironmentVariable(\"HUGGINGFACE_API_TOKEN\", \"Your-HuggingFace-API-Token-Here\", \"User\")\n        ```\n\n    This token is crucial for the chatbot to access language model functionalities provided by Hugging Face.\n\n##   Running the Application\n\n1.  **Run the ingestion script to prepare the data:**\n\n    ```bash\n    python ingest.py\n    ```\n\n2.  Launch the Streamlit application:\n\n    ```bash\n    streamlit run app.py\n    ```\n\n---\n\n##   Usage 🔍\n\nNavigate 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.\"# vakil-ai\" \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevspidr%2Fvakil-ai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevspidr%2Fvakil-ai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevspidr%2Fvakil-ai/lists"}