支持一键预测脚本

This commit is contained in:
2026-08-23 14:30:20 +08:00
parent dc65b98568
commit 286626dfe5
8 changed files with 561 additions and 38 deletions

13
scripts/update_and_predict.sh Executable file
View File

@@ -0,0 +1,13 @@
#!/usr/bin/env bash
set -euo pipefail
REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
PYTHON_BIN="$REPO_ROOT/.venv/bin/python"
if [[ ! -x "$PYTHON_BIN" ]]; then
printf 'missing virtualenv Python: %s\n' "$PYTHON_BIN" >&2
exit 1
fi
cd "$REPO_ROOT"
exec "$PYTHON_BIN" -m cbpred.latest_predict "$@"