Logo Lanfrica

jeduclo/LexCam---Assistant-P-nal-Camerounais

Domaine:

natural language processing

Type de record:

software
Créateur:
jed
Hôte:
LexCam is an advanced AI-powered legal assistant designed to help users navigate the Cameroon Penal Code (2016). It uses Retrieval-Augmented Generation (RAG) to provide accurate, citation-backed answers and simulates a legal tribunal for case analysis. LexCam 🇨🇲 - Assistant Pénal Camerounais LexCam is an advanced AI-powered legal assistant designed to help users navigate the Cameroon Penal Code. It uses Retrieval-Augmented Generation (RAG) to provide accurate, citation-backed answers and simulates a legal tribunal for case analysis. Features AI Chatbot: Ask questions in plain language and get answers grounded in the Penal Code. Multi-Agent System: Investigator Agent: Extracts legal keywords from user scenarios. Judge Agent: Analyzes facts using the IRAC method (Issue, Rule, Analysis, Conclusion). Defense Agent: Proposes mitigating circumstances and legal excuses. Prosecution Agent: Argues for strict application of the law and aggravating circumstances. Persistence: Automatically indexes and saves PDF documents to disk for instant loading. Transparency: Strict hallucination controls (Temperature 0) and citation requirements. Tech Stack Python 3.9+ Streamlit: Web Interface LangChain: Agent Orchestration Google Gemini (1.5 Flash): LLM Engine FAISS: Vector Database (Local Storage) PyPDF: Document Processing 📦 Installation 1. Clone the Repository git clone github.com cd lexcam-cameroun 2. Set up Virtual Environment Windows: python -m venv venv venv\Scripts\activate 3. Install Dependencies pip install -r requirements.txt 4. Configure API Key Create a .streamlit/secrets.toml file in the root directory: # .streamlit/secrets.toml GOOGLE_API_KEY = "your_google_api_key_here" (Get your key from Google AI Studio) 5. Add Data Ensure your PDF documents (e.g., Cameroun-Code-2016-penal1.pdf) are inside the data/ folder. Usage Run the application locally: streamlit run app.py The app will open in your browser at localhost. First Run: The app will take a few minutes to process the PDFs and create the faiss_index_store. Subsequent Runs: It will load instantly from the saved index. ⚖️ Disclaimer This tool is an AI experiment and does not constit …