- 实现数据预处理模块(data.py)和模型训练模块(train.py) - 添加智能客服Agent应用(agent_app.py)和DNA解码系统(dna_decoder.py) - 包含补偿推荐系统(compensation_recommender.py)和可视化支持 - 添加项目配置文件(pyproject.toml)和README文档 - 提供多种启动脚本(start_app.*, fix_path_and_run.bat等)
36 lines
1.3 KiB
PowerShell
36 lines
1.3 KiB
PowerShell
# 快速启动脚本 - 智能修复 PATH 并启动应用
|
|
|
|
Write-Host "🚀 快速启动脚本" -ForegroundColor Cyan
|
|
Write-Host "========================================" -ForegroundColor Cyan
|
|
|
|
# 智能修复 PATH
|
|
if ($env:PATH -like "*C:;Users*" -or $env:PATH -like "*;%S;stemRoot%*") {
|
|
Write-Host "🔧 检测到 PATH 格式错误,正在修复..." -ForegroundColor Yellow
|
|
$env:PATH = $env:PATH.Replace('C:;Users', 'C:\Users').Replace(';%S;stemRoot%', ';%SystemRoot%')
|
|
Write-Host "✅ PATH 修复完成" -ForegroundColor Green
|
|
}
|
|
|
|
# 切换到项目目录
|
|
Set-Location "d:\HuaweiMoveData\Users\马艺洁\Desktop\MLwork\bigwork"
|
|
|
|
# 智能选择运行方式
|
|
Write-Host "🔍 检查 UV 命令可用性..." -ForegroundColor Cyan
|
|
$uvAvailable = $false
|
|
try {
|
|
$uvVersion = uv --version 2>$null
|
|
if ($LASTEXITCODE -eq 0) {
|
|
$uvAvailable = $true
|
|
Write-Host "✅ UV 命令可用: $uvVersion" -ForegroundColor Green
|
|
}
|
|
} catch {
|
|
Write-Host "⚠️ UV 命令不可用,将使用 python -m uv" -ForegroundColor Yellow
|
|
}
|
|
|
|
# 启动应用
|
|
if ($uvAvailable) {
|
|
Write-Host "🚀 使用 UV 启动 Streamlit 应用..." -ForegroundColor Green
|
|
uv run streamlit run src/streamlit_app.py
|
|
} else {
|
|
Write-Host "🚀 使用 python -m uv 启动 Streamlit 应用..." -ForegroundColor Green
|
|
python -m uv run streamlit run src/streamlit_app.py
|
|
} |