feat: 初始化 YieldSmart 农业智能决策系统

基于多因子 Cobb-Douglas 产量模型的作物种植决策支持应用。

  新增文件:
  - app.py: Streamlit 主应用,包含产量预测模型、多作物数据库、
    雷达图/敏感性分析可视化、作物推荐排行及智能建议面板
  - main.py: 入口文件
  - pyproject.toml: 项目配置(Python 3.14+,依赖 streamlit/plotly/pandas/numpy)
  - Dockerfile: 基于 uv 镜像的容器化部署配置
  - justfile: 任务自动化(运行/格式化/检查/清理)
  - .gitignore: Python/IDE/缓存忽略规则
This commit is contained in:
zhenghu
2026-04-13 14:20:39 +08:00
parent 3279d16e4f
commit 9cb70267b6
7 changed files with 800 additions and 2 deletions

View File

@@ -1,3 +1,89 @@
# yield-smart-app
# YieldSmart 农业智能决策系统
农业智能决策系统
基于多因子 Cobb-Douglas 产量模型的作物种植决策支持应用。
## 功能特性
- 🌾 多作物产量预测(水稻、小麦、玉米、大豆、油菜、棉花)
- 📊 影响因子雷达图可视化
- 🏅 作物推荐智能排行
- 📈 产量敏感性分析(氮肥/降雨量)
- 💡 智能种植建议与环境匹配评估
## 技术栈
- Python 3.14+
- Streamlit 1.52.1
- Plotly 6.5.0
- Pandas 2.3.3
- NumPy 2.3.5
## 快速开始
### 使用 uv推荐
```bash
# 安装依赖
uv sync
# 运行应用
uv run streamlit run app.py
```
### 使用传统方式
```bash
# 创建虚拟环境
python -m venv .venv
source .venv/bin/activate
# 安装依赖
pip install -r requirements.txt
# 运行应用
streamlit run app.py
```
## 项目结构
```
YieldSmart/
├── app.py # 主应用文件Streamlit
├── main.py # 入口文件
├── pyproject.toml # 项目配置
├── justfile # 任务自动化
├── Dockerfile # Docker 配置
└── README.md # 项目文档
```
## 使用 just
项目使用 justfile 进行任务管理:
```bash
# 查看所有可用命令
just --list
# 运行应用
just run
# 代码格式化
just format
# 代码检查
just check
```
## Docker 部署
```bash
# 构建镜像
docker build -t yieldsmart .
# 运行容器
docker run -p 8000:8000 yieldsmart
```
## 许可证
MIT License