Spaces:
Running
Running
File size: 779 Bytes
9605f46 |
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
# Log in to Hugging Face to access model
echo "Logging in to Hugging Face..."
if [ -n "$HF_TOKEN" ]; then
echo "Using provided HF_TOKEN"
huggingface-cli login --token $HF_TOKEN
else
echo "No HF_TOKEN provided, trying to use cached credentials"
fi
# Clone repository if needed
if [ ! -d "./csm" ]; then
echo "Cloning CSM repository..."
git clone https://github.com/SesameAILabs/csm.git
cd csm
# Copy files back to parent directory
cp -r generator.py models.py watermarking.py ../
cd ..
else
echo "CSM repository already exists"
fi
# Install additional dependencies
echo "Installing additional dependencies..."
pip install -q git+https://github.com/SesameAILabs/csm.git
echo "Setup complete! Ready to start the application." |