Download scripts/setup_paddleocr.ps1 from Syncre/arabic-audio-reader-worker: direct link, hf CLI and curl.
- Browser
- Download file 618 Bytes
-
https://huggingface.co/spaces/Syncre/arabic-audio-reader-worker/resolve/main/scripts/setup_paddleocr.ps1
- Command line
-
hf download hf://spaces/Syncre/arabic-audio-reader-worker/scripts/setup_paddleocr.ps1
-
curl -L -o setup_paddleocr.ps1 https://huggingface.co/spaces/Syncre/arabic-audio-reader-worker/resolve/main/scripts/setup_paddleocr.ps1
618 Bytes
| param( | |
| [string]$Python = "py -3.10" | |
| ) | |
| $ErrorActionPreference = "Stop" | |
| $root = Split-Path -Parent (Split-Path -Parent $MyInvocation.MyCommand.Path) | |
| $venv = Join-Path $root ".venv-ocr" | |
| if (-not (Test-Path $venv)) { | |
| Invoke-Expression "$Python -m venv `"$venv`"" | |
| } | |
| $pythonExe = Join-Path $venv "Scripts\python.exe" | |
| & $pythonExe -m pip install --upgrade pip | |
| & $pythonExe -m pip install -r (Join-Path $root "requirements-paddleocr.txt") | |
| Write-Host "PaddleOCR Arabic PP-OCRv5 sidecar is ready at $venv" | |
| Write-Host "Use OCR_ENGINE=paddleocr only as a fallback; the website's readable default is Tesseract Arabic." | |