WebUI for Baicai
Project description
Baicai WebUI
Baicai WebUI:面向教学的白菜人工智能平台Web界面。
概述
Baicai WebUI 为交互式教材打造一个示例,它提供了学情调研、个性化教材生成、个性化问答、人工智能实验智能体、智能体工作流的可视化功能、与 AI 智能体的实时交互,以及用于管理和监控智能体活动的用户友好环境。
功能特性
- 🎨 基于 Streamlit 构建的现代化、响应式 Web 界面
- 📊 使用 Mermaid 图表的交互式工作流可视化
- 🔄 实时智能体交互和监控
- 📈 基于流程的智能体工作流可视化
系统要求
- Python 3.10 或更高版本(但低于 3.12)
- Poetry 用于依赖管理
- Windows 用户:需要提前安装 Microsoft Visual C++ Redistributable(Microsoft Visual C++ 可再发行组件包)。请根据您的系统架构下载并安装 Microsoft Visual C++ 2015-2022 Redistributable(x64 版本适用于大多数现代 Windows 系统)
安装
如果不想安装,直接进入百度网盘:https://pan.baidu.com/s/1T8p-WZ48q46k-DHccah6GQ?pwd=3edj 提取码:3edj,下载相关文件,具体见运行应用
方法1: 使用 pip 安装(推荐)
这是最简单的安装方式,适用于大多数用户。
pip install baicai-webui
安装完成后,可以通过以下命令启动应用:
baicai-webui
方法2: 使用 Poetry 安装(开发环境)
- 安装 Baicai WebUI 及其依赖:
cd baicai_webui
poetry install
方法3: 构建自包含包(生产环境)
自包含包包含了完整的 Python 环境和所有依赖,无需安装任何环境即可运行。
构建自包含包
- 确保已安装所有依赖:
cd baicai_webui
poetry install
- 运行构建脚本:
python build_self_contained.py
- 构建完成后,自包含包位于
dist/baicai-self-contained/目录
使用自包含包
- 将
dist/baicai-self-contained/目录压缩分发给用户 - 用户解压后,运行启动脚本即可:
- Windows: 双击
启动应用.bat - Linux/Mac: 在终端运行
./启动应用.sh(无法使用,勿用)
- Windows: 双击
自包含包特点
✅ 完全自包含,无需安装 Python ✅ 无需安装任何依赖包 ✅ 环境完全隔离,不会影响系统 ✅ 即解压即用 ✅ 跨平台兼容
运行应用
前期准备
如果需要使用教材功能,需要做如下设置:
-
下载资源文件
打开百度网盘:https://pan.baidu.com/s/1T8p-WZ48q46k-DHccah6GQ?pwd=3edj 提取码:3edj
-
必需文件(必须下载):
.baicai.zip:软件运行环境(可自动生成)和示例数据数据和工作流.zip:教材配套实验资源
-
可选文件(仅在网络环境受限时下载):
.cache.zip:缓存数据.fastai.zip:FastAI 相关数据
-
解压和配置:
解压下载的 zip 文件,并按以下规则放置:
-
必需文件夹(解压
.baicai.zip后):- 将
.baicai文件夹放入用户主目录- Windows:
C:\Users\你的用户名\ - Linux/Mac:
~/或/home/你的用户名/
- Windows:
- 将
-
可选文件夹(仅在下载了对应 zip 文件时):
- 将
.cache文件夹放入用户主目录 - 将
.fastai文件夹放入用户主目录
- 将
-
pip 安装方式运行
如果使用 pip 安装,直接运行:
baicai-webui
Poetry 安装方式运行
- 启动 Web 界面:
baicai-webui
- 或者直接运行:
streamlit run baicai_webui/app.py
项目结构
baicai_webui/
├── baicai_webui/ # 主包目录
│ ├── app.py # 主 Streamlit 应用
│ ├── components/ # UI 组件
│ └── utils/ # 工具函数
├── docs/ # 文档
├── tests/ # 测试文件
├── build_self_contained.py # 自包含包构建脚本
├── pyproject.toml # 项目配置
└── dist/ # 构建输出目录
└── baicai-self-contained/ # 自包含包
├── python/ # Python 环境
├── baicai_webui/ # 应用代码
├── baicai_base/ # 基础模块
├── baicai_dev/ # 开发模块
├── baicai_tutor/ # 教程模块
├── 启动应用.sh # Linux/Mac 启动脚本
├── 启动应用.bat # Windows 启动脚本
└── README.txt # 使用说明
贡献
- Fork 本仓库
- 创建功能分支
- 进行您的更改
- 运行测试并确保通过
- 提交 Pull Request
许可证
本项目采用 GPL-3.0 许可证。
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file baicai_webui-0.1.2.tar.gz.
File metadata
- Download URL: baicai_webui-0.1.2.tar.gz
- Upload date:
- Size: 90.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
78764e5ad9d567dd430a9b985895bae331799ab0460917da512924c3bf7e1ef3
|
|
| MD5 |
150e9ca147e1c726b0a92c13f5f4c921
|
|
| BLAKE2b-256 |
89ebef6fb1fc256be4d6e42b7e2ed03931eb380ecc75556fa490f71f48b6a3f2
|
File details
Details for the file baicai_webui-0.1.2-py3-none-any.whl.
File metadata
- Download URL: baicai_webui-0.1.2-py3-none-any.whl
- Upload date:
- Size: 105.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
016059ed03be05bf2d3b5903758c6a5ace8bd4f607c79c323df996821a349a43
|
|
| MD5 |
e32e2a7fe83576b4b3f4ebd7a301d43f
|
|
| BLAKE2b-256 |
514fb9b534621388462fc6f38baaca33a6ba7dca90d427dda8f24ae164d43749
|