fix: auto-fix code issues (cron)
- 修复重复导入/字段 - 修复异常处理 - 修复PEP8格式问题 - 添加类型注解
This commit is contained in:
@@ -328,7 +328,7 @@ class ImageProcessor:
|
||||
return unique_entities
|
||||
|
||||
def generate_description(
|
||||
self, image_type: str, ocr_text: str, entities: list[ImageEntity]
|
||||
self, image_type: str, ocr_text: str, entities: list[ImageEntity],
|
||||
) -> str:
|
||||
"""
|
||||
生成图片描述
|
||||
@@ -481,13 +481,13 @@ class ImageProcessor:
|
||||
target=sentence_entities[j].name,
|
||||
relation_type="related",
|
||||
confidence=0.5,
|
||||
)
|
||||
),
|
||||
)
|
||||
|
||||
return relations
|
||||
|
||||
def process_batch(
|
||||
self, images_data: list[tuple[bytes, str]], project_id: str = None
|
||||
self, images_data: list[tuple[bytes, str]], project_id: str = None,
|
||||
) -> BatchProcessingResult:
|
||||
"""
|
||||
批量处理图片
|
||||
|
||||
Reference in New Issue
Block a user