Initial commit: Add AI tagging images project files
This commit is contained in:
@@ -35,7 +35,8 @@ class QwenConfig:
|
||||
@dataclass
|
||||
class TagDeriveConfig:
|
||||
"""标签衍生配置"""
|
||||
batch_size: int = 3 # 每批处理图片数
|
||||
batch_size: int = 50 # 每批次从数据库读取的图片数量
|
||||
concurrency: int = 10 # 并发请求数(同时发出的API请求数)
|
||||
min_derived_tags: int = 5 # 最少衍生标签数
|
||||
max_derived_tags: int = 10 # 最多衍生标签数
|
||||
max_tag_length: int = 10 # 单个标签最大长度
|
||||
@@ -86,6 +87,7 @@ class Settings:
|
||||
|
||||
# 标签衍生配置
|
||||
settings.tag_derive.batch_size = int(os.getenv("BATCH_SIZE", settings.tag_derive.batch_size))
|
||||
settings.tag_derive.concurrency = int(os.getenv("CONCURRENCY", settings.tag_derive.concurrency))
|
||||
settings.tag_derive.min_derived_tags = int(os.getenv("MIN_DERIVED_TAGS", settings.tag_derive.min_derived_tags))
|
||||
settings.tag_derive.max_derived_tags = int(os.getenv("MAX_DERIVED_TAGS", settings.tag_derive.max_derived_tags))
|
||||
settings.tag_derive.image_cdn_base = os.getenv("IMAGE_CDN_BASE", settings.tag_derive.image_cdn_base)
|
||||
|
||||
Reference in New Issue
Block a user