Spaces:
Runtime error
Runtime error
| title: Atalink-TTS-Talker | |
| emoji: π | |
| colorFrom: purple | |
| colorTo: blue | |
| sdk: gradio | |
| sdk_version: 5.45.0 | |
| python_version: 3.10.18 | |
| app_file: app.py | |
| pinned: false | |
| license: mit | |
| # π Atalink-TTS-Talker | |
| A Hugging Face Space powered by **Gradio**. | |
| This project demonstrates **SadTalker** with local environment setup, backup/restore guides, and Docker deployment. | |
| ## Reference: [Spaces Config Docs](https://huggingface.co/docs/hub/spaces-config-reference) | |
| --- | |
| ### Use local: | |
| ## π₯οΈ Local Setup | |
| ### 1. Python environment | |
| - Use **Python 3.10** | |
| ```bash | |
| python -m venv .venv | |
| source .venv/bin/activate | |
| ``` | |
| ### 2. Install PyTorch with CUDA 12.4 | |
| ```bash | |
| pip install torch==2.4.0+cu124 torchaudio==2.4.0+cu124 torchvision==0.19.0 --extra-index-url https://download.pytorch.org/whl/cu124 | |
| ``` | |
| ### 3. Install dependencies | |
| ```bash | |
| sudo apt-get update | |
| sudo apt-get install sox ffmpeg | |
| ``` | |
| --- | |
| ## πΎ Backup & Restore Volumes | |
| > β οΈ Make sure you **mount the backup folder** into the container before running these commands. | |
| ### πΉ Backup | |
| ```bash | |
| # Cache | |
| tar -czvf /backup/data_cache_backup.tar.gz /home/user/.cache | |
| # GFPGAN data | |
| tar -czvf /backup/data_gfpgan_backup.tar.gz /home/user/app/gfpgan | |
| ``` | |
| ### πΉ Restore | |
| ```bash | |
| # Restore cache | |
| mkdir -p /home/user/.cache | |
| cd /home/user/.cache | |
| tar -xzvf /backup/data_cache_backup.tar.gz --strip 1 | |
| # Restore GFPGAN | |
| mkdir -p /home/user/app/gfpgan | |
| cd /home/user/app/gfpgan | |
| tar -xzvf /backup/data_gfpgan_backup.tar.gz --strip 1 | |
| ``` | |
| --- | |
| ## π Running the App | |
| 1. Create and activate Python 3.10 environment | |
| 2. Prepare environment: | |
| ```bash | |
| python utils/prepare_environment.py | |
| ``` | |
| 3. Start with Docker Compose: | |
| ```bash | |
| docker compose up -d | |
| ``` | |
| 4. If you change code, rebuild: | |
| ```bash | |
| docker compose up -d --build | |
| ``` | |
| --- | |
| β¨ Done! You can now run **SadTalker** locally or deploy with Docker. | |