# Quick Reference: HuggingFace Deployment ## 🚀 Deploy in 5 Steps ### 1️⃣ Create Space Go to https://huggingface.co/spaces → New Space - **SDK**: Gradio - **Python**: 3.10 - **Public**: Yes ### 2️⃣ Clone Repository ```bash git clone https://huggingface.co/spaces// cd ``` ### 3️⃣ Copy Files ```bash cp -r /path/to/GradCAMPlusPlus_SkinLesion/* . ``` ### 4️⃣ Push to HF ```bash git add . git commit -m "Deploy: Multimodal Skin Lesion App" git push ``` ### 5️⃣ Wait for Build Monitor at: `https://huggingface.co/spaces//` --- ## 📚 Key Files | File | Purpose | |------|---------| | `app.py` | Entry point | | `requirements.txt` | Dependencies | | `spaces.yaml` | HF config | | `README.md` | Documentation | | `DEPLOYMENT.md` | Detailed guide | | `DEPLOYMENT_CHECKLIST.md` | Verification list | | `CONTRIBUTING.md` | Contribution guide | --- ## ✅ What Was Prepared - [x] App code with type hints - [x] Dependencies optimized - [x] Configuration files created - [x] Documentation complete - [x] Checklist provided - [x] Contributing guidelines added - [x] License included - [x] Examples & templates ready --- ## 🔗 URLs - **HF Spaces**: https://huggingface.co/spaces - **This Project**: https://huggingface.co/spaces/``/`` - **Gradio Docs**: https://gradio.app/docs --- ## 💡 Pro Tips - **Speed**: Enable GPU in `spaces.yaml` for faster inference - **Cost**: CPU-only mode works but is ~3x slower - **Testing**: Run `python app.py` locally first - **Debugging**: Check Logs tab on HF Spaces - **Updates**: Push changes and Space rebuilds automatically --- ## ❓ Troubleshooting | Issue | Solution | |-------|----------| | Models not found | Verify `data/weights/` in repo | | Out of memory | Add GPU or reduce batch size | | Build fails | Check Python 3.10 in spaces.yaml | | Slow inference | Enable GPU in spaces.yaml | --- ## 📊 Resources - **Size**: ~600 MB (4 models + preprocessing) - **RAM**: 2-3 GB minimum - **Time**: 30-60s first run, 5-15s cached - **GPU**: Optional (A10G recommended) --- **Status**: ✅ **DEPLOYMENT READY** Go forth and deploy! 🎉 For detailed instructions, see `DEPLOYMENT.md` or `DEPLOYMENT_CHECKLIST.md`