RefDiffNet / setup.sh
ShashwatGupta23's picture
RefDiffNet: standalone A11_CA prebackbone Gradio Space
5673379
Raw History Blame
650 Bytes
#!/usr/bin/env bash
# Hugging Face Spaces: install deps before app starts (no ultralytics).
set -euo pipefail
cd "$(dirname "$0")"
pip install -q -r requirements.txt
pip install -q "numpy>=1.23.0,<2" "gradio-client==1.7.0"
python -c "import gradio_patch; gradio_patch.apply(); print('gradio_patch OK')"
export GRADIO_SERVER_NAME="${GRADIO_SERVER_NAME:-0.0.0.0}"
export GRADIO_SERVER_PORT="${GRADIO_SERVER_PORT:-${PORT:-7860}}"
export PRELOAD_MODEL="${PRELOAD_MODEL:-1}"
export PREBACKBONE_ONLY_WEIGHTS="${PREBACKBONE_ONLY_WEIGHTS:-$(pwd)/weights/prebackbone_a11_ca.pt}"
echo "RefDiffNet: standalone A11_CA (GRADIO_SERVER_NAME=${GRADIO_SERVER_NAME})"