# 🔐 SETUP INSTRUCTIONS FOR HUGGING FACE SPACE ## ⚠️ IMPORTANT: Add Your HuggingFace Token The Llama 3.1 model is **gated** and requires authentication. ### Steps to Add Token: 1. **Get your HuggingFace token:** - Go to: https://huggingface.co/settings/tokens - Copy your token (starts with `hf_...`) 2. **Request access to Llama 3.1:** - Go to: https://huggingface.co/meta-llama/Llama-3.1-8B-Instruct - Click "Request Access" - Wait for approval (usually instant) 3. **Add token to Space secrets:** - Go to: https://huggingface.co/spaces/sayande/agri-critique/settings - Scroll to "Repository secrets" - Click "New secret" - Name: `HF_TOKEN` - Value: `` - Click "Add" 4. **Restart the Space:** - The space will automatically rebuild - Wait ~2-3 minutes for it to load ### ✅ After Setup: Your space will be able to: - Load Llama 3.1 8B base model - Load your fine-tuned LoRA adapters - Run full RAG pipeline - Answer questions with evidence - Validate answers for errors ### 🌐 Your Space: https://huggingface.co/spaces/sayande/agri-critique --- ## 📊 System Overview: **Model:** Llama 3.1 8B + LoRA (sayande/agri-critique-llama) **Dataset:** FAISS index (sayande/agri-critique-index) **Hardware:** CPU (free) - upgrade to GPU T4 for faster performance **Performance:** - CPU: ~30-60s per query - GPU T4: ~5-10s per query