File size: 3,649 Bytes
3b23239
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
๏ปฟ# ๐Ÿš€ 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

1. **Hugging Face Account**: Make sure you have an account at https://huggingface.co/
2. **Access Token**: Generate a write access token from https://huggingface.co/settings/tokens
3. **Git**: Ensure Git is installed on your system

## ๐Ÿ”‘ Authentication Setup

### Option 1: Using Hugging Face CLI (Recommended)
```bash
# 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
```bash
# Configure git to use your HF token as password
git remote set-url origin https://bravedims:YOUR_HF_TOKEN@huggingface.co/spaces/bravedims/AI_Avatar_Chat.git
```

## ๐Ÿ“ค Deploy to Hugging Face

Once authenticated, push your changes:

```bash
# 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

1. **๐ŸŽญ Avatar Generation**: Text-to-avatar with lip-sync
2. **๐Ÿ—ฃ๏ธ ElevenLabs TTS**: High-quality text-to-speech
3. **๐ŸŽต Audio URL Support**: Direct audio file inputs
4. **๐Ÿ–ผ๏ธ Image References**: Guide avatar appearance
5. **โšก GPU Acceleration**: Optimized for HF hardware

## ๐Ÿ› ๏ธ Environment Variables

To enable ElevenLabs TTS functionality:

1. Go to your Space settings on HF
2. Add a secret named `ELEVENLABS_API_KEY`
3. Set the value to your ElevenLabs API key

## ๐ŸŽฎ Testing Your Deployment

After deployment:

1. Wait for the space to build (may take 10-15 minutes)
2. Access your space at: https://huggingface.co/spaces/bravedims/AI_Avatar_Chat
3. Test the Gradio interface with sample prompts
4. 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:

1. Modify files in your local HF_Deploy/AI_Avatar_Chat directory
2. Commit changes: `git add . && git commit -m "Update message"`
3. Push: `git push origin main`
4. 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

1. Complete authentication setup above
2. Push to deploy: `git push origin main`
3. Configure ElevenLabs API key as secret
4. Test and iterate on your deployed space!

Your OmniAvatar-14B space is ready for deployment! ๐Ÿš€