bupalinyu's picture
Deploy Audio8 TTS SGLang voice cloning Space
ede6f53 verified
Raw
History Blame Contribute Delete
334 Bytes
#!/usr/bin/env bash
set -euo pipefail
/home/user/app/scripts/run_backend.sh &
backend_pid=$!
cleanup() {
kill "${backend_pid}" 2>/dev/null || true
}
trap cleanup EXIT INT TERM
# Expose the UI immediately while SGLang initializes the model in the background.
exec uvicorn app:app --host 0.0.0.0 --port "${PORT:-7860}" --workers 1