File size: 650 Bytes
add24bd
5673379
add24bd
 
5673379
 
 
f63e98a
5673379
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/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})"