ai-time-machine / scripts /run_realtime_app.ps1
manikandanj's picture
Prepare AI Time Machine hackathon Space
5862322 verified
Raw
History Blame Contribute Delete
570 Bytes
$ErrorActionPreference = "Stop"
$root = Split-Path -Parent $PSScriptRoot
Set-Location $root
$python = Join-Path $root ".runtime-venv\Scripts\python.exe"
if (-not (Test-Path $python)) {
$python = Join-Path $root ".venv\Scripts\python.exe"
}
if (-not (Test-Path $python)) {
throw "Python runtime was not found. Expected .runtime-venv or .venv."
}
if (-not $env:GRADIO_SERVER_NAME) {
$env:GRADIO_SERVER_NAME = "127.0.0.1"
}
if (-not $env:GRADIO_SERVER_PORT) {
$env:GRADIO_SERVER_PORT = "7860"
}
& $python (Join-Path $root "app.py")