sadmN's picture
Upload scripts/setup_env.sh with huggingface_hub
fe6336c verified
Raw History Blame Contribute Delete
650 Bytes
#!/usr/bin/env bash
# Create the python environment and fetch the weights from this repo.
set -e
REPO="sadmN/emotion-avatar-server"
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
cd "$ROOT"
python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
# weights (IMTalker generator + renderer + wav2vec2 + reference image)
pip install "huggingface_hub[cli]"
huggingface-cli download "$REPO" --local-dir weights_hf \
--include "imtalker/*" "weights/wav2vec2-base-960h/*" "weights/ref.jpeg"
mkdir -p code
unzip -oq emotion_avatar_code.zip -d code
echo "done. weights in ./weights_hf, code in ./code/emo_code"