Spaces:
Build error
Build error
File size: 1,101 Bytes
c57019c 18dcc68 c57019c |
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 |
#!/bin/bash
# Make script exit on error
set -e
echo "Setting up LLaMA-Omni on Hugging Face Spaces..."
# Downgrade pip to avoid OmegaConf metadata validation issues
echo "Downgrading pip to version 24.0 to avoid OmegaConf metadata validation issues..."
python -m pip install --upgrade "pip<24.1"
# Create necessary directories
mkdir -p models/speech_encoder vocoder
# Download vocoder models if needed
if [ ! -f "vocoder/g_00500000" ]; then
echo "Downloading vocoder models..."
wget -P vocoder/ https://dl.fbaipublicfiles.com/fairseq/speech_to_speech/vocoder/code_hifigan/mhubert_vp_en_es_fr_it3_400k_layer11_km1000_lj/g_00500000
wget -P vocoder/ https://dl.fbaipublicfiles.com/fairseq/speech_to_speech/vocoder/code_hifigan/mhubert_vp_en_es_fr_it3_400k_layer11_km1000_lj/config.json
fi
# Create empty __init__.py files for the package structure
mkdir -p omni_speech/serve omni_speech/infer/examples
touch omni_speech/__init__.py
touch omni_speech/serve/__init__.py
touch omni_speech/infer/__init__.py
echo "✅ Setup complete! LLaMA-Omni is now ready to run on Hugging Face Spaces." |