Spaces:
Running
Running
A newer version of the Gradio SDK is available:
5.44.0
๏ปฟ# ๐ Manual Deployment Guide for Hugging Face Spaces
Your OmniAvatar project has been prepared for deployment to Hugging Face Spaces. Since we encountered some authentication issues, here's how to complete the deployment manually:
๐ Prerequisites
- Hugging Face Account: Make sure you have an account at https://huggingface.co/
- Access Token: Generate a write access token from https://huggingface.co/settings/tokens
- Git: Ensure Git is installed on your system
๐ Authentication Setup
Option 1: Using Hugging Face CLI (Recommended)
# Install the Hugging Face CLI
pip install -U "huggingface_hub[cli]"
# Login with your token
huggingface-cli login
# When prompted, enter your access token from https://huggingface.co/settings/tokens
Option 2: Using Git Credentials
# Configure git to use your HF token as password
git remote set-url origin https://bravedims:[email protected]/spaces/bravedims/AI_Avatar_Chat.git
๐ค Deploy to Hugging Face
Once authenticated, push your changes:
# Navigate to the deployment directory
cd path/to/HF_Deploy/AI_Avatar_Chat
# Push to deploy
git push origin main
๐ Files Prepared for Deployment
Your space now includes:
- โ app.py - Main application with FastAPI + Gradio interface
- โ requirements.txt - Optimized dependencies for HF Spaces
- โ Dockerfile - HF Spaces compatible Docker configuration
- โ README.md - Comprehensive space documentation
- โ configs/ - Model configuration files
- โ scripts/ - Inference scripts
- โ examples/ - Sample inputs
- โ elevenlabs_integration.py - TTS integration
๐ง Space Configuration
The space is configured with:
- SDK: Docker
- Hardware: T4-medium (GPU enabled)
- Port: 7860 (required by HF Spaces)
- User: Non-root user as required by HF
- Base Image: PyTorch with CUDA support
๐ฏ Key Features Deployed
- ๐ญ Avatar Generation: Text-to-avatar with lip-sync
- ๐ฃ๏ธ ElevenLabs TTS: High-quality text-to-speech
- ๐ต Audio URL Support: Direct audio file inputs
- ๐ผ๏ธ Image References: Guide avatar appearance
- โก GPU Acceleration: Optimized for HF hardware
๐ ๏ธ Environment Variables
To enable ElevenLabs TTS functionality:
- Go to your Space settings on HF
- Add a secret named
ELEVENLABS_API_KEY
- Set the value to your ElevenLabs API key
๐ฎ Testing Your Deployment
After deployment:
- Wait for the space to build (may take 10-15 minutes)
- Access your space at: https://huggingface.co/spaces/bravedims/AI_Avatar_Chat
- Test the Gradio interface with sample prompts
- Verify API endpoints work:
/health
,/generate
๐ Monitoring
- Check build logs in the HF Space interface
- Monitor resource usage and performance
- Review user feedback and iterate
๐ Updating Your Space
To make changes:
- Modify files in your local HF_Deploy/AI_Avatar_Chat directory
- Commit changes:
git add . && git commit -m "Update message"
- Push:
git push origin main
- HF will automatically rebuild and redeploy
๐ Troubleshooting
- Build fails: Check Dockerfile and requirements.txt
- Model not found: Ensure download_models.sh runs correctly
- Memory issues: Consider upgrading to larger hardware
- Port conflicts: Space must use port 7860
๐ฏ Next Steps
- Complete authentication setup above
- Push to deploy:
git push origin main
- Configure ElevenLabs API key as secret
- Test and iterate on your deployed space!
Your OmniAvatar-14B space is ready for deployment! ๐