@echo off chcp 65001 > nul set OLLAMA_MODEL=deepseek-r1:7b rem 启动Ollama服务 start "Ollama DeepSeek" cmd /k ollama run %OLLAMA_MODEL% rem 检测11434端口是否就绪 echo 等待Ollama服务启动... :retry powershell -command "$result = Test-NetConnection -ComputerName localhost -Port 11434 -WarningAction SilentlyContinue; if (-not $result.TcpTestSucceeded) { exit 1 }" if %errorlevel% neq 0 ( timeout /t 5 >nul goto retry ) rem 启动Python脚本 call .\AIGC\Scripts\activate.bat start "AIGC Python" python main.py --model %OLLAMA_MODEL%