diff --git a/genPrompts/Refer/标题参考格式.txt b/genPrompts/Refer/标题参考格式.txt index 0e4ea38..e19fa64 100644 --- a/genPrompts/Refer/标题参考格式.txt +++ b/genPrompts/Refer/标题参考格式.txt @@ -1,102 +1,198 @@ + +[example] 被问爆的99元海景房,刷到就闭眼入‼ +[example] 599住进森林温泉别墅🏡淡季爽到飞起! +[example] 深圳周边!希尔顿一晚➕️温泉才不到500 +[example] 谁懂!99住进270°全海景房,值哭😭 +[example] 帐篷房+温泉+泳池!599解锁遛娃天堂 +[example] 广东本地人爱去的温泉酒店被我挖到了! +[example] 谁懂啊!!在惠州发现了温泉酒店卷王! +[example] 99元住海景房🤯淡季海岛捡漏秘籍‼ +[example] 没有人敢说惠州希尔顿酒店的事吗? +[example] 五一反向旅行!齐云小镇住+玩含门票…💰399俩 +[example] 乌镇免门票!住景区+早茶客+游船…才555💰俩 +[example] 99住海景王座房‼错过等下辈子 +[example] 高铁亲子游🚄带娃在北海的三天两夜,附攻略, +[example] 安吉!城堡酒店+helloKitty乐园2日票!💰688 +[example] 佛山遛娃!盈香心动乐园!💰399=住+2天畅玩! +[example] 暑假遛娃来青甘亲子游,听听这5条良心建议, +[example] 湖州🦒亲子圣地|5天4晚行程分享, +[example] 🐼成都也太适合亲子游了吧!3天2晚攻略来喽, +[example] 带娃去大理后,我后悔了! 😭后悔没早来! +[example] 🦒长隆二天一夜❸园🏨亲子游经验🐘, +[example] 2024旅行结算|超🐔大型亲子乐园平躺攻略, +[example] 国庆广州亲子游❄️冰雪游乐园室内遛娃好去处, +[example] 去了8次扬州❗这条高质量遛娃路线藏不住了, +[example] 追鲸🐳桂西南带娃已回🔥跟风最成功的一次🔥, +[example] 济南春季亲子游‼️3天2晚看这一篇就够了💯, +[example] 广州亲子游🚗1.5h到温泉乐园宫崎骏树屋遛娃, +[example] 三刷乌村‼️2天1晚保姆级吃住玩攻略‼️, +[example] 低幼友好!京郊2h直达懒人遛娃地,解放爸妈!, +[example] 清远新世界酒店|遛娃真的太爽太舒服了♨️, +[example] 2月18陵水穷游已回,说点掏心窝子的话, +[example] 带娃避寒首选,广西崇左+北海+涠洲岛攻略!, +[example] 嘉兴三天两夜亲子游|杭州🚗1.5h达!, +[example] 江浙沪亲子酒店排名,还有漏的吗?, +[example] 崇左带娃已回...说点难听的实话, +[example] 江浙沪遛娃❤️徐州欧乐堡两天一晚亲子游, +[example] 成都带娃已回,亲子游真实体验(不删), +[example] 周末游 | 江门市赤坎古镇,是谁说不推荐的?, +[example] 亲子游天花板❗️小众不挤还省钱✨抄作业啦, +[example] 三亚家庭游|5天四晚这样安排,人均1800, +[example] 两天一夜!宁波亲子游攻略, +[example] 西双版纳 5 天 4 晚亲子游,get“不费妈”攻略, +[example] 📍广州顺德佛山丨省心路线🗺️避雷指南, +[example] 迄今为止我最喜欢的亲子游目的地出现了!, +[example] 初次海南亲子游|海口、陵水7日总结, +[example] 四天三晚广州亲子游攻略, +[example] 北京牛马不请假,25年带爸妈遛娃这么玩!1, +[example] 📍清远!带娃去生态度假村做了一回野孩子, +[example] 拜托🙏去万宁就死磕威斯汀,1088/三天,, +[example] 5个亲子游地带娃超轻松|1️⃣岁宝宝亲测, +[example] 广州动物园亲子游 | 千万不要临近中午才去, +[example] 在成都,带宝贝在6000平游乐园里寻找宝藏吧, +[example] 千岛湖|很chill的一次亲子游, +[example] 今年五一我只带娃去一个地方:徽州!🤩, -2025全年亲子游🥇8个宝藏目的地汇总‼️, +[example] 成都周末去哪儿I古镇星空亲子游, +[example] 解锁亲子游的「瘦shen副本」攻略】✨, +[example] 宁波奈尔宝/遛娃乐园天花板, +[example] 敦煌带娃已回,亲子游真实体验(不删), +[example] 来广州过个暖冬‼️4天3晚保姆级亲子游攻略, +[example] 天呐🤣这里已经颠覆了我的想象‼️实在太好玩, +[example] 划重点!3月适合带幼儿园孩子去的5个地方, +[example] N次扬州三天两夜亲子游🧸看这里就够全了🎈, +[example] 我的年度最爱 甩娃亲子游天花板!, +[example] 大连亲子游|本地人推荐的4天3夜✨, +[example] 说点实话:贵州🆚版纳 已回 慎重 附路线, +[example] 🦒佛山长鹿遛娃一日游,节日氛围已经拉满, +[example] 2025年带娃必去的🔟个旅游地点, +[example] 冷空气杀到!😎我反手带娃跳进38℃温泉海💦, +[example] 🌈迄今为止,我最喜欢的亲子游城市出现了, +[example] 广东亲子游ᵕ̈过年还要再来赏樱花🌸, +[example] 高铁遛娃|济南太适合亲子游了!📋超实用攻略, +[example] 亲子游的松弛感拿捏住了, +[example] 江浙沪徒步|上海1-2h可达的亲子路线合集🍃, +[example] 我宣布‼这个亲子酒店399我们玩回本了, +[example] 云南弥勒☀️和版纳相比,更推荐带娃去这里, +[example] 听劝❗广东旅游保姆级攻略,吃住玩全都有!, +[example] 昆明➕抚仙湖4天3晚🌈亲子游分享, +[example] 全新💯香港海洋公园亲子游不走回头路攻略, +[example] 抄作业‼️周五出发3日2夜成都亲子游不请假, +[example] 🌿 华南植物园亲子游 赏花科普一站搞定❗, +[example] 广东周边亲子游|适合6岁以下娃踏春好去处❗️, +[example] 广西遛娃plog🌈 | 带娃实现嗦粉自由🍜, +[example] 呼伦贝尔亲子游!娃哭着不愿回来的攻略~, +[example] 南京2天1晚亲子游旅游攻略! 不踩雷!, +[example] 东莞小洱海🌊来吹吹蓝色的风, +[example] 广州周边游|高铁0-4小时可到达城市汇总, +[example] 广州番禺该去哪里❓看这篇就够了,快收藏吧, +[example] 3.4实拍 松山湖这里已进入盛花期~, +[example] 重庆本地人周末都去哪儿玩 ‼️, +[example] 🔥终于公布了。广州39个蕞值得去的地方, +[example] 广州🆓新展|好治愈!! 掉进奇妙春日幻境✨⛲️, 国庆假期🚄从广州出发!4小时内可达城市汇总, 春日限定🌼在广州拍到了✨故事里的小黄花~, 石家庄出发,周末两天出游攻略来啦!, +[example] 2-3月广东赏花季🌸6个绝美赏花地必收藏!, +[example] 终于整理好了😭武汉春日必去的①⑥个徒步路线, +[example] 大胆周末48H❗️天津➡徐州两日游, +[example] 🆘除了七星岩,端州大学生周末还能去哪?, +[example] 春游踏青| 十条适合周末出行玩乐新手路线, +[example] 📘Infj|男大学生 ✨周末无课plog, 广州一日往返!9个春天上春山周末小众散心处, 深圳📍误入莫奈瀑布花海🌷春日浪漫💕免费!, diff --git a/poster_gen_config.json b/poster_gen_config.json index a208658..ea96449 100644 --- a/poster_gen_config.json +++ b/poster_gen_config.json @@ -1,7 +1,7 @@ { "date": "4月29日,4月30日, 4月28日, 5月1日", - "num": 5, - "variants": 5, + "num": 15, + "variants": 15, "topic_temperature": 0.2, "topic_top_p": 0.3, "topic_presence_penalty": 1.5, diff --git a/utils/__pycache__/resource_loader.cpython-312.pyc b/utils/__pycache__/resource_loader.cpython-312.pyc index 8431007..5ecade9 100644 Binary files a/utils/__pycache__/resource_loader.cpython-312.pyc and b/utils/__pycache__/resource_loader.cpython-312.pyc differ diff --git a/utils/resource_loader.py b/utils/resource_loader.py index 5a198b6..fb7175b 100644 --- a/utils/resource_loader.py +++ b/utils/resource_loader.py @@ -1,6 +1,6 @@ import os import random - +import json class ResourceLoader: """资源加载器,用于加载提示词和参考资料""" @@ -32,7 +32,7 @@ class ResourceLoader: files = os.listdir(refer_dir) for file in files: file_path = os.path.join(refer_dir, file) - if os.path.isfile(file_path): + if os.path.isfile(file_path) and file_path.endswith(".txt"): # Use the updated load_file_content content = ResourceLoader.load_file_content(file_path) if content: # Check if content was loaded successfully @@ -43,6 +43,14 @@ class ResourceLoader: content_lines = random.sample(content_lines, sample_size) content = "\n".join(content_lines) refer_content += f"## {file}\n{content}\n\n" + elif os.path.isfile(file_path) and file_path.endswith(".json"): + # 读取json文件 + with open(file_path, 'r', encoding='utf-8') as f: + content = json.load(f) + + ## 随机进行多次抽样 + + refer_content += f"## {file}\n{content}\n\n" return refer_content except Exception as e: print(f"加载Refer目录文件失败: {e}")