Spaces:
Running
Running
Download pathqa-app from Shubhambhandari/Pathify: direct link, hf CLI and curl.
- Browser
- Download file 762 Bytes
-
https://huggingface.co/spaces/Shubhambhandari/Pathify/resolve/main/pathqa-app
- Command line
-
hf download hf://spaces/Shubhambhandari/Pathify/pathqa-app
-
curl -L -o pathqa-app https://huggingface.co/spaces/Shubhambhandari/Pathify/resolve/main/pathqa-app
762 Bytes
| # PathQA one-command launcher. | |
| # ./pathqa-app -> start the app and open the browser | |
| # ./pathqa-app demo -> patch QA demo | |
| # ./pathqa-app slide-demo -> whole-slide QA demo | |
| # ./pathqa-app train ... -> train on PatchCamelyon | |
| # On first run it creates a local venv and installs requirements. | |
| set -e | |
| DIR="$(cd "$(dirname "$0")" && pwd)" | |
| cd "$DIR" | |
| PY="${PYTHON:-python3}" | |
| if [ ! -d ".venv" ]; then | |
| echo "[PathQA] first run: creating .venv and installing requirements (torch etc.)…" | |
| "$PY" -m venv .venv | |
| ./.venv/bin/pip install --upgrade pip >/dev/null | |
| ./.venv/bin/pip install -r requirements.txt | |
| fi | |
| export PYTHONPATH="$DIR:$DIR/backend:$PYTHONPATH" | |
| exec ./.venv/bin/python "$DIR/pathqa/cli.py" "${@:-serve}" | |