#!/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."