Files
assist/start_traditional.sh

51 lines
1.3 KiB
Bash
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.
#!/bin/bash
echo "启动TSP智能助手传统版本..."
echo
# 检查Python环境
echo "检查Python环境..."
if ! command -v python3 &> /dev/null; then
if ! command -v python &> /dev/null; then
echo "错误: 未找到Python请先安装Python"
echo "安装命令:"
echo " Ubuntu/Debian: sudo apt update && sudo apt install python3 python3-pip"
echo " CentOS/RHEL: sudo yum install python3 python3-pip"
echo " 或访问: https://www.python.org/downloads/"
exit 1
else
PYTHON_CMD="python"
fi
else
PYTHON_CMD="python3"
fi
echo "Python环境正常: $($PYTHON_CMD --version)"
echo
# 检查依赖
echo "检查Python依赖..."
if [ ! -f "requirements.txt" ]; then
echo "警告: 未找到requirements.txt文件"
else
echo "安装Python依赖..."
$PYTHON_CMD -m pip install -r requirements.txt
fi
echo
echo "启动Web服务器..."
echo "访问地址: http://localhost:5000"
echo
echo "功能包括:"
echo "- 仪表板: http://localhost:5000"
echo "- 聊天页面: http://localhost:5000/chat"
echo "- 预警管理: http://localhost:5000/alerts"
echo "- 知识库: http://localhost:5000/knowledge"
echo "- 字段映射: http://localhost:5000/field-mapping"
echo "- 系统设置: http://localhost:5000/system"
echo
echo "按 Ctrl+C 停止服务器"
echo
$PYTHON_CMD src/web/app.py