Go to file
黎润豪 17ef9cc836 feat: 添加 GLM-OCR 识别功能
- 新增 OCR 服务模块支持文字/表格/公式识别
- 添加 OCR API 路由(文件上传和 base64 方式)
- 更新配置以支持 GLM-OCR 模型
- 添加必要的依赖项(torch, transformers, accelerate)
2026-02-25 15:55:50 +08:00
src feat: 添加 GLM-OCR 识别功能 2026-02-25 15:55:50 +08:00
tests Initial commit: Add project structure with GLM OCR demo 2026-02-11 17:23:48 +08:00
.env.example feat: 添加 GLM-OCR 识别功能 2026-02-25 15:55:50 +08:00
.gitignore Initial commit: Add project structure with GLM OCR demo 2026-02-11 17:23:48 +08:00
README.md Initial commit: Add project structure with GLM OCR demo 2026-02-11 17:23:48 +08:00
requirements.txt feat: 添加 GLM-OCR 识别功能 2026-02-25 15:55:50 +08:00

README.md

GLM OCR Demo

基于 Python 的 Web 项目,使用 FastAPI 框架。

开发环境设置

  1. 创建虚拟环境:
python -m venv venv
  1. 激活虚拟环境:
# Windows
venv\Scripts\activate

# Linux/Mac
source venv/bin/activate
  1. 安装依赖:
pip install -r requirements.txt
  1. 复制环境变量文件:
copy .env.example .env
  1. 运行开发服务器:
python -m uvicorn src.main:app --reload --host 0.0.0.0 --port 8000

项目结构

glmocrdemo/
├── src/
│   ├── api/          # API 路由
│   ├── models/       # 数据模型
│   ├── services/     # 业务逻辑
│   ├── core/         # 核心配置
│   └── main.py       # 应用入口
├── tests/            # 测试文件
├── .env.example      # 环境变量示例
├── requirements.txt  # 项目依赖
└── README.md         # 项目说明