diff --git a/README.md b/README.md index 1308b56..78a7808 100644 --- a/README.md +++ b/README.md @@ -106,13 +106,15 @@ 🔗 **端点**:`POST /slide_match` -| 参数 | 类型 | 描述 | -|------|------|------| -| `target_file` | File | 目标图片文件(可选) | -| `background_file` | File | 背景图片文件(可选) | -| `target` | String | Base64 编码的目标图片字符串(可选) | -| `background` | String | Base64 编码的背景图片字符串(可选) | -| `simple_target` | Boolean | 是否使用简单目标(默认:false) | +| 参数 | 类型 | 描述 | +|-------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------| +| `target_file` | File | 目标图片文件(可选)需要与target字段同时使用 | +| `target` | String | Base64 编码的目标图片字符串(可选) 需要与target_file字段同时使用 | +| `background_file` | File | 背景图片文件(可选) 需要与background字段同时使用 | +| `background` | String | Base64 编码的背景图片字符串(可选) 需要与background_file字段同时使用 | +| `simple_target` | Boolean | 是否使用简单目标(默认:false) | +|| | `target_file`和`target` 为一组字段,`background_file`和`background` 为一组字段, 两组字段不可同时使用,同时使用则仅一组会生效 | + ### 3. 目标检测 diff --git a/app/main.py b/app/main.py index c16f808..7b4aece 100644 --- a/app/main.py +++ b/app/main.py @@ -2,8 +2,8 @@ import uvicorn from fastapi import FastAPI, File, UploadFile, HTTPException, Form from typing import Optional, Union import base64 -from app.models import OCRRequest, SlideMatchRequest, DetectionRequest, APIResponse -from app.services import ocr_service +from models import OCRRequest, SlideMatchRequest, DetectionRequest, APIResponse +from services import ocr_service app = FastAPI()