初始化请求模型
| 8 | |
| 9 | |
| 10 | class InitializeRequest(BaseModel): |
| 11 | """初始化请求模型""" |
| 12 | ocr: bool = Field(True, description="是否启用OCR功能") |
| 13 | det: bool = Field(False, description="是否启用目标检测功能") |
| 14 | old: bool = Field(False, description="是否使用旧版OCR模型") |
| 15 | beta: bool = Field(False, description="是否使用beta版OCR模型") |
| 16 | use_gpu: bool = Field(False, description="是否使用GPU") |
| 17 | device_id: int = Field(0, description="GPU设备ID") |
| 18 | import_onnx_path: str = Field("", description="自定义ONNX模型路径") |
| 19 | charsets_path: str = Field("", description="自定义字符集路径") |
| 20 | |
| 21 | |
| 22 | class SwitchModelRequest(BaseModel): |
no outgoing calls
no test coverage detected
searching dependent graphs…