-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
45 lines (37 loc) · 990 Bytes
/
run.sh
File metadata and controls
45 lines (37 loc) · 990 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
# 多模态数据处理项目运行脚本
echo "多模态数据处理项目"
echo "===================="
# 检查Python环境
if ! command -v python3 &> /dev/null; then
echo "错误: 未找到Python3"
exit 1
fi
# 检查是否已安装依赖
if ! python3 -c "import PyPDF2, docx, PIL" &> /dev/null; then
echo "安装项目依赖..."
pip3 install -r requirements.txt
if [ $? -ne 0 ]; then
echo "错误: 依赖安装失败"
exit 1
fi
fi
# 创建示例目录结构
echo "创建示例目录..."
mkdir -p data/input
mkdir -p data/output
mkdir -p logs
# 运行程序
echo "运行数据处理程序..."
echo "用法示例:"
echo " python3 src/main.py --input data/input --output data/output"
echo ""
echo "查看支持的文件格式:"
echo " python3 src/main.py info"
echo ""
echo "查看配置信息:"
echo " python3 src/main.py config-info"
# 如果有参数,直接运行
if [ $# -gt 0 ]; then
python3 src/main.py "$@"
fi