BULAK/启动应用.bat

92 lines
1.9 KiB
Batchfile
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@echo off
chcp 65001 >nul
title 多Agent决策工作坊启动器
echo ========================================
echo 多Agent决策工作坊 - 便携版启动器
echo ========================================
echo.
echo 正在检查Python环境...
:: 检查Python
python --version >nul 2>&1
if errorlevel 1 (
echo ❌ 错误未找到Python
echo.
echo 请先安装Python 3.8+ 并确保已添加到PATH
echo 下载地址https://www.python.org/downloads/
echo.
pause
exit /b 1
)
echo ✅ Python环境正常
echo.
echo 正在检查依赖...
:: 检查并安装streamlit
python -c "import streamlit" >nul 2>&1
if errorlevel 1 (
echo 安装streamlit...
python -m pip install streamlit --user
if errorlevel 1 (
echo ❌ streamlit安装失败
pause
exit /b 1
)
echo ✅ streamlit安装成功
) else (
echo ✅ streamlit已安装
)
:: 检查并安装openai
python -c "import openai" >nul 2>&1
if errorlevel 1 (
echo 安装openai...
python -m pip install openai --user
if errorlevel 1 (
echo ❌ openai安装失败
pause
exit /b 1
)
echo ✅ openai安装成功
) else (
echo ✅ openai已安装
)
:: 检查并安装python-dotenv
python -c "import dotenv" >nul 2>&1
if errorlevel 1 (
echo 安装python-dotenv...
python -m pip install python-dotenv --user
if errorlevel 1 (
echo ❌ python-dotenv安装失败
pause
exit /b 1
)
echo ✅ python-dotenv安装成功
) else (
echo ✅ python-dotenv已安装
)
echo.
echo ✅ 所有依赖检查完成
echo.
echo 正在启动多Agent决策工作坊...
echo.
echo 🌐 应用将在浏览器中自动打开
echo 📱 地址http://localhost:8513
echo.
echo ⏳ 请稍候...
echo.
:: 运行应用
python -m streamlit run app.py --server.headless true --server.port 8513
echo.
echo 应用已关闭
echo.
pause