Download test.sh from webxos/microd-bigram-v2: direct link, hf CLI and curl.
- Browser
- Download file 447 Bytes
-
https://huggingface.co/webxos/microd-bigram-v2/resolve/main/test.sh
- Command line
-
hf download hf://webxos/microd-bigram-v2/test.sh
-
curl -L -o test.sh https://huggingface.co/webxos/microd-bigram-v2/resolve/main/test.sh
447 Bytes
| set -euo pipefail | |
| cd "$(dirname "$0")" | |
| PY="${PYTHON:-python3}" | |
| if ! command -v "$PY" >/dev/null 2>&1; then echo "Error: python3 not found" >&2; exit 1; fi | |
| if [ ! -f model.json ]; then echo "Error: model.json not found" >&2; exit 1; fi | |
| $PY -c "import json; m=json.load(open('model.json')); print('OK: format=%s vocab=%d states=%d' % (m.get('format','?'), len(m.get('vocab',[])), len(m.get('transitions',{}))))" | |
| exec $PY test.py | |