-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.bat
More file actions
48 lines (41 loc) · 1.11 KB
/
run.bat
File metadata and controls
48 lines (41 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
@echo off
setlocal
set "DIR=%~dp0"
set "VENV=%DIR%.venv"
echo === AEMO NEM Explorer ===
echo.
:: Check Python is available
python --version >nul 2>&1
if errorlevel 1 (
echo Python not found.
echo Please install Python from https://www.python.org/downloads/
echo Make sure to tick "Add Python to PATH" during install.
pause
exit /b 1
)
:: Create venv on first run
if not exist "%VENV%\Scripts\activate.bat" (
echo Setting up for the first time - this takes about a minute...
python -m venv "%VENV%"
if errorlevel 1 (
echo Failed to create virtual environment.
pause
exit /b 1
)
call "%VENV%\Scripts\activate.bat"
pip install --quiet -r "%DIR%requirements.txt"
if errorlevel 1 (
echo Failed to install packages.
pause
exit /b 1
)
echo Setup complete.
echo.
) else (
call "%VENV%\Scripts\activate.bat"
)
echo Starting dashboard - your browser will open automatically.
echo Press Ctrl+C in this window to stop.
echo.
streamlit run "%DIR%aemo_dashboard.py" --server.headless false --browser.gatherUsageStats false
pause