Logo Lanfrica

ohamjoseph/burkina_law_rag

Domaine:

natural language processing

Type de record:

software
Créateur:
oha
HĂ´te:
Mise en place d'un RAG pour la constitution du burkina Faso # 📜 **Application de Recherche Augmentée - Constitution du Burkina Faso** Une application basée sur l'intelligence artificielle utilisant LangChain et Ollama pour effectuer une recherche augmentée dans la Constitution du Burkina Faso. Elle comprend un backend API développé avec FastAPI et une interface utilisateur construite avec Streamlit. --- ## **🚀 Déploiement Local** ### **1. Prérequis** - **Python 3.12+** - **Docker (facultatif)** ### **2. Installation** 1. Clonez le dépôt : ```bash git clone github.com cd burkina_law_rag ``` 2. Créez et activez l'environnement virtuel : ```bash python -m venv rag_env source rag_env/bin/activate ``` 3. Installez les dépendances : ```bash pip install -r requirements.txt ``` 4. Configurez les variables d'environnement : ```bash cp .env.example .env ``` --- ### **3. Installation de Ollama et LLaMA3.2** #### **3.1. Installation d’Ollama** 1. **Téléchargez Ollama** : Suivez les instructions d’installation officielles sur le site d’Ollama : Installation d'Ollama 2. **Lancez Ollama Localement** : ```bash ollama serve --host localhost --port 11434 ``` --- #### **3.2. Installation de LLaMA 3.2** 1. **Téléchargement du Modèle LLaMA 3.2** ```bash ollama pull llama3.2 ``` 2. **Vérification du Modèle** : ```bash ollama list ``` 3. **Ajoutez LLaMA à vos Variables d’Environnement** : ```env MODEL=llama3.2 BASE_URL=localhost ``` --- ### **4. Lancement de l'API Backend (FastAPI)** ```bash fastapi dev backend/main.py ``` --- ### **5. Lancement de l'Interface Utilisateur (Streamlit)** ```bash streamlit run frontend/app.py ``` --- ### **6. Accès à l'Application** - **Backend API** : localhost (Swagger) - **Frontend Streamlit** : localhost --- ## **🔧 Utilisation avec Docker** Si vous préférez Docker, utilisez `docker-compose` : ```bash docker-compose up --build ``` --- ## **📊 Fonctionnalités** 1. **Recherche Augmentée :** Interrogez la Cons …

Licenses