# 🚀 Deploy to Hugging Face Spaces RIGHT NOW ## Copy-Paste This (5 Minutes) ### 1️⃣ Create Hugging Face Space (2 min) Go to: **https://huggingface.co/new-space** Fill in: - **Owner**: Your username - **Space name**: `financial-research-agent` - **License**: MIT - **Select SDK**: **Gradio** ⬅️ IMPORTANT! - **Space hardware**: CPU basic • free - **Visibility**: Public Click **Create Space** --- ### 2️⃣ Get Your Git URL (30 sec) After creating the Space, you'll see: ``` git remote add origin https://huggingface.co/spaces/YOUR_USERNAME/financial-research-agent ``` **Copy that URL!** You'll need it in step 3. --- ### 3️⃣ Deploy from Your Computer (2 min) Open terminal in the `financial-research-agent` folder and run: **On Windows (Git Bash or WSL):** ```bash # Initialize git git init # Create deployment branch git checkout -b hf-deploy # Prepare HF files cp README_HF.md README.md cp requirements-hf.txt requirements.txt # Add files git add app.py README.md requirements.txt src/ .gitattributes # Commit git commit -m "Initial Hugging Face Spaces deployment" # Add HF remote (replace YOUR_USERNAME with your actual username) git remote add hf https://huggingface.co/spaces/YOUR_USERNAME/financial-research-agent # Push to HF Spaces git push hf hf-deploy:main ``` **You'll be prompted for:** - Username: Your HF username - Password: Use a **HF Token** (not your password) **To get a HF Token:** 1. Go to https://huggingface.co/settings/tokens 2. Click "New token" 3. Name it "financial-research-agent" 4. Role: "write" 5. Copy the token and paste when prompted for password --- ### 4️⃣ Configure Secrets (1 min) 1. Go to your Space: `https://huggingface.co/spaces/YOUR_USERNAME/financial-research-agent` 2. Click **Settings** tab 3. Scroll down to **Variables and secrets** 4. Click **New secret** Add these secrets: **Secret 1:** - Name: `SEC_EMAIL` - Value: `your@email.com` - Save **Secret 2:** - Name: `NEWS_API_KEY` - Value: (Get from https://newsapi.org/) - Save --- ### 5️⃣ Wait for Build (~5-10 min) 1. Click **App** tab 2. Watch the build logs 3. First build downloads models (~500MB) - this is normal! 4. When you see "Running on local URL: http://0.0.0.0:7860" → **YOU'RE LIVE!** 🎉 --- ## ✅ Your Live Demo ``` https://huggingface.co/spaces/YOUR_USERNAME/financial-research-agent ``` **Test it:** 1. Enter ticker: `TSLA` 2. Company: `Tesla Inc` 3. Filing: `10-K` 4. Click **Analyze** 5. Wait ~1-2 minutes --- ## 📋 Add to Resume **Live Demo:** https://huggingface.co/spaces/YOUR_USERNAME/financial-research-agent **Resume Line:** > Financial Research Agent | Python, FinBERT, Multi-Agent AI, Hugging Face > Deployed production ML application to Hugging Face Spaces with auto-scaling inference API --- ## 🐛 Troubleshooting **Build failed?** - Check **Logs** tab for errors - Usually missing secrets → Add SEC_EMAIL and NEWS_API_KEY **"Application startup failed"?** - Verify secrets are set correctly - Check you selected **Gradio SDK** (not Streamlit or Static) **Taking forever?** - First build = 5-10 min (downloading models) - Subsequent rebuilds = 1-2 min **Need help?** - Check full guide: `DEPLOYMENT_GUIDE.md` - Or ping me! --- ## 🎯 Next Steps 1. ✅ Deploy to HF Spaces (you're here!) 2. 📸 Take screenshots for README 3. 🔗 Share link on LinkedIn 4. 💼 Add to resume 5. 🚀 Add AWS S3 integration (next session) Let's get this live! 🔥