이미지 크롤링 로직 변경 및 자막 이미지 매칭 보완
This commit is contained in:
1 parent
04d8614919
commit
46449a7a3f
20 files changed
+1828
-1116
No files matched your search
@@ -6,10 +6,11 @@ from app.utils.prompts.schemas import SpaceType, Subject, Camera, MotionRecommen
|
||||
|
||||
import asyncio
|
||||
|
||||
async def autotag_image(image_url : str) -> list[str]: #tag_list
|
||||
async def autotag_image(image_url : str, industry: str = "") -> list[str]: #tag_list
|
||||
chatgpt = ChatgptService(model_type="gemini")
|
||||
image_input_data = {
|
||||
"img_url" : image_url,
|
||||
"industry" : industry,
|
||||
"space_type" : list(SpaceType),
|
||||
"subject" : list(Subject),
|
||||
"camera" : list(Camera),
|
||||
@@ -19,10 +20,11 @@ async def autotag_image(image_url : str) -> list[str]: #tag_list
|
||||
image_result = await chatgpt.generate_structured_output(image_autotag_prompt, image_input_data, image_url, False)
|
||||
return image_result
|
||||
|
||||
async def autotag_images(image_url_list : list[str]) -> list[dict]: #tag_list
|
||||
async def autotag_images(image_url_list : list[str], industry: str = "") -> list[dict]: #tag_list
|
||||
chatgpt = ChatgptService(model_type="gemini")
|
||||
image_input_data_list = [{
|
||||
image_input_data_list = [{
|
||||
"img_url" : image_url,
|
||||
"industry" : industry,
|
||||
"space_type" : list(SpaceType),
|
||||
"subject" : list(Subject),
|
||||
"camera" : list(Camera),
|
||||
|
||||
Reference in new issue
Block a user