| title | RAG PDF Cloud |
|---|---|
| emoji | 📄 |
| colorFrom | blue |
| colorTo | green |
| sdk | docker |
| pinned | false |
Posez des questions sur vos PDFs — propulsé par Groq + HuggingFace, déployé sur HuggingFace Spaces.
- 📥 Ingestion de PDFs jusqu'à 40MB
- 🔍 Embeddings locaux via HuggingFace (all-MiniLM-L6-v2)
- 🗄️ Vectorstore persistant avec ChromaDB
- ⚡ Génération ultra-rapide via Groq (llama-3.3-70b)
- 💬 Interface chat Streamlit avec historique et sources
- 🌍 Déployé sur HuggingFace Spaces
PDF
│
▼
PyPDFLoader ──► RecursiveCharacterTextSplitter
│
▼
HuggingFaceEmbeddings (all-MiniLM-L6-v2)
│
▼
ChromaDB (local)
│
┌─────┴─────┐
│ │
Retriever Groq LLM
│ │
└─────┬─────┘
│
RetrievalQA Chain
│
▼
Réponse + Sources
| Composant | Outil | Rôle |
|---|---|---|
| LLM | Groq (llama-3.3-70b) | Génération de réponses |
| Embeddings | HuggingFace (all-MiniLM-L6-v2) | Vectorisation des chunks |
| Vectorstore | ChromaDB | Stockage et recherche sémantique |
| Orchestration | LangChain | Pipeline RAG |
| UI | Streamlit | Interface utilisateur |
| Hébergement | HuggingFace Spaces | Déploiement cloud gratuit |
langchain==0.1.20
langchain-community==0.0.38
langchain-groq==0.1.3
chromadb==0.4.24
pypdf==4.2.0
streamlit==1.34.0
sentence-transformers==2.7.0
python-dotenv==1.0.0
numpy==1.26.4
git clone https://github.com/salmazenn/rag-pdf-cloud.git
cd rag-pdf-cloudpython3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtecho "GROQ_API_KEY=ta_clé_gsk_..." > .envstreamlit run src/app.pyOuvre http://localhost:8501 dans ton navigateur.
- Va sur huggingface.co/new-space
- SDK : Docker → Blank
- Visibility : Public
git remote add hf https://huggingface.co/spaces/ton-username/rag-pdf-cloud
git push hf main- Space → ⋮ → Settings → Variables and secrets
- Ajoute
GROQ_API_KEYavec ta clégsk_...
⚠️ HuggingFace utilise le port 7860 — pas 8501⚠️ Ajouter.streamlit/config.tomlpour les uploads⚠️ Ne jamais pusher le fichier.envsur GitHub
- Support multi-PDFs dans le même index
- Évaluation automatique avec RAGAS
- Reranking des chunks
- Authentification sur l'interface
MIT