Download code/common/env.ps1 from aziz9788/OvisOCR3-Arabic-workdir: direct link, hf CLI and curl.
- Browser
- Download file 1.01 kB
-
https://huggingface.co/datasets/aziz9788/OvisOCR3-Arabic-workdir/resolve/main/code/common/env.ps1
- Command line
-
hf download hf://datasets/aziz9788/OvisOCR3-Arabic-workdir/code/common/env.ps1
-
curl -L -o env.ps1 https://huggingface.co/datasets/aziz9788/OvisOCR3-Arabic-workdir/resolve/main/code/common/env.ps1
1.01 kB
| # Dot-sourced by architectures\*\*.ps1. Moves to the repo root and sets the folder variables | |
| # (same defaults and environment variables as common/paths.py). | |
| $ErrorActionPreference = "Stop" | |
| Set-Location (Join-Path $PSScriptRoot "..") | |
| $W = if ($env:OCR_WORK_DIR) { $env:OCR_WORK_DIR } else { "data" } | |
| $MODELS = if ($env:OCR_MODELS_DIR) { $env:OCR_MODELS_DIR } else { "$W/models" } | |
| $UPSTREAM = if ($env:OCR_UPSTREAM_DIR) { $env:OCR_UPSTREAM_DIR } else { "$W/upstream" } | |
| $PREPARED = if ($env:OCR_PREPARED_DIR) { $env:OCR_PREPARED_DIR } else { "$W/prepared" } | |
| $RUNS = if ($env:OCR_RUNS_DIR) { $env:OCR_RUNS_DIR } else { "$W/runs" } | |
| $PY = if ($env:PYTHON) { $env:PYTHON } else { "python" } | |
| # Run a native command and stop the script if it fails (Windows PowerShell does not do this by itself). | |
| function Invoke-Step { | |
| $exe, $rest = $args | |
| & $exe @rest | |
| if ($LASTEXITCODE -ne 0) { throw "failed (exit $LASTEXITCODE): $exe $rest" } | |
| } | |