#!/usr/bin/env bash # 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}"