CoolFace
Apppublic

LyderickH/Datagouv-explorer

sourceHugging Facemitupdated 5mo agoView on Hugging Face
0likes
App README

Explorateur data.gouv.fr — agent MCP + LLM gratuit

Agent conversationnel branché sur le MCP officiel data.gouv.fr (https://mcp.data.gouv.fr/mcp) avec un LLM gratuit (par défaut Groq, alternatives GitHub Models / HF).

Architecture

Utilisateur ──▶ Gradio Chat ──▶ LLM (Groq / GitHub / HF)
                                    │ tool_calls
                                    ▼
                              MCP client + download_preview
                                    │
                                    ▼
                          mcp.data.gouv.fr/mcp

Le LLM décide quels outils appeler (MCP : recherche dataset/org/ressource ; local : download_preview pour fetch un fichier).

Configuration

Dans Settings → Variables and secrets du Space :

Groq (défaut — 14 400 req/jour gratuit, ultra rapide)

NomTypeValeur
GROQ_API_KEYSecretClé Groq (créer)
MODEL_IDVariable (optionnel)Défaut : llama-3.3-70b-versatile. Autres : llama-3.1-8b-instant, mixtral-8x7b-32768

GitHub Models (alternative)

NomTypeValeur
LLM_PROVIDERVariablegithub
GITHUB_TOKENSecretPAT GitHub (créer)
MODEL_IDVariable (optionnel)Défaut : openai/gpt-4o-mini

Hugging Face (alternative)

NomTypeValeur
LLM_PROVIDERVariablehf
HF_TOKENSecretToken HF scope inference
MODEL_IDVariable (optionnel)Défaut : meta-llama/Llama-3.3-70B-Instruct

Commun

NomTypeValeur
MCP_URLVariable (optionnel)Défaut : https://mcp.data.gouv.fr/mcp

Lancement local

bash
export GROQ_API_KEY=gsk_...
pip install -r requirements.txt
python app.py

Intégration portfolio

Voir embed.html pour l'iframe à coller sur lyderickh.github.io.

Liens