RefDiffNet / setup.sh
ShashwatGupta23's picture
Cursor
Fix HF Space unstyled UI: stop overriding Gradio proxy settings
3fd90d5
Raw
History Blame Contribute Delete
521 Bytes
#!/usr/bin/env bash
# Hugging Face Spaces: install ML deps only (Gradio version comes from README sdk_version).
set -euo pipefail
cd "$(dirname "$0")"
pip install -q -r requirements.txt
pip install -q "numpy>=1.23.0,<2"
# Do not reinstall gradio-client here — mismatched client breaks HF Space CSS/JS loading.
export PRELOAD_MODEL="${PRELOAD_MODEL:-1}"
export PREBACKBONE_ONLY_WEIGHTS="${PREBACKBONE_ONLY_WEIGHTS:-$(pwd)/weights/prebackbone_a11_ca.pt}"
echo "RefDiffNet: deps ready (gradio from sdk_version in README)"