glmocrdemo/README.md

50 lines
953 B
Markdown
Raw Permalink Normal View History

# GLM OCR Demo
基于 Python 的 Web 项目,使用 FastAPI 框架。
## 开发环境设置
1. 创建虚拟环境:
```bash
python -m venv venv
```
2. 激活虚拟环境:
```bash
# Windows
venv\Scripts\activate
# Linux/Mac
source venv/bin/activate
```
3. 安装依赖:
```bash
pip install -r requirements.txt
```
4. 复制环境变量文件:
```bash
copy .env.example .env
```
5. 运行开发服务器:
```bash
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 # 项目说明
```