diff --git a/一键启动.bat b/一键启动.bat new file mode 100644 index 0000000..fd11256 --- /dev/null +++ b/一键启动.bat @@ -0,0 +1,72 @@ +@echo off +chcp 65001 >nul +title Multi-Agent Decision Workshop - Smart Launcher + +echo ======================================== +echo Multi-Agent Decision Workshop - Smart Launcher + +echo ======================================== +echo. + +echo Checking Python environment... + +:: Check Python +python --version >nul 2>&1 +if errorlevel 1 ( + echo ERROR: Python not found + echo. + echo Please install Python 3.8+ and add to PATH + echo Download: https://www.python.org/downloads/ + echo. + pause + exit /b 1 +) + +echo OK Python environment check passed +echo. + +echo Checking dependencies... + +:: Check and install dependencies +python -m pip install -r requirements.txt >nul 2>&1 +if errorlevel 1 ( + echo ERROR: Dependencies installation failed, trying manual installation... + python -m pip install streamlit openai python-dotenv +) + +echo OK Dependencies check completed +echo. + +echo Getting network information... + +:: Get local IP address +for /f "tokens=2 delims=:" %%i in ('ipconfig ^| findstr "IPv4"') do ( + set "IP_ADDR=%%i" + goto :IP_FOUND +) + +:IP_FOUND +set "IP_ADDR=%IP_ADDR: =%" + +echo Network information obtained: +echo Local URL: http://localhost:8513 +echo LAN URL: http://%IP_ADDR%:8513 +echo. + +echo Starting application... +echo Please wait, browser will open automatically... +echo. + +:: Automatically open browser (local address) +start http://localhost:8513 + +:: Run application +python -m streamlit run app.py --server.headless true --server.port 8513 --server.address 0.0.0.0 --browser.gatherUsageStats false --browser.serverAddress 0.0.0.0 + +echo. +echo ======================================== +echo Application stopped running + +echo ======================================== +echo. +pause \ No newline at end of file