qq修改了配置文件

This commit is contained in:
jinye_huang 2025-04-26 11:40:21 +08:00
parent 27a4168a64
commit 754b12f629
4 changed files with 24 additions and 17 deletions

View File

@ -47,7 +47,7 @@
| **春节** | 1月5日-1月27日 | 1月28日-2月4日 | | **春节** | 1月5日-1月27日 | 1月28日-2月4日 |
| **情人节** | 2月1日-2月13日 | 2月14日 | | **情人节** | 2月1日-2月13日 | 2月14日 |
| **清明节** | 3月25日-4月3日 | 4月4日-4月6日 | | **清明节** | 3月25日-4月3日 | 4月4日-4月6日 |
| **劳动节** | 4月20日-4月30日 | 5月1日-5月5日 | | **五一** | 4月20日-4月30日 | 5月1日-5月5日 |
| **端午节** | 5月21日-5月30日 | 5月31日-6月2日 | | **端午节** | 5月21日-5月30日 | 5月31日-6月2日 |
| **中秋节** | 9月1日-9月5日 | 9月6日 | | **中秋节** | 9月1日-9月5日 | 9月6日 |
| **国庆节** | 9月1日-9月30日 | 10月1日-10月8日 | | **国庆节** | 9月1日-9月30日 | 10月1日-10月8日 |
@ -76,4 +76,4 @@
| **12月** | 6-7日、13-14日、20-21日、27-28日 | | **12月** | 6-7日、13-14日、20-21日、27-28日 |
**说明** **说明**
- 调休影响春节1月26日周日、2月8日周六上班劳动节4月27日周日上班、国庆节9月28日周日、10月11日周六上班表中已排除调休日。 - 调休影响春节1月26日周日、2月8日周六上班五一4月27日周日上班、国庆节9月28日周日、10月11日周六上班表中已排除调休日。

View File

@ -8,17 +8,15 @@
{ {
"type": "Object", "type": "Object",
"file_path": [ "file_path": [
"./resource/Object/中山温泉宾馆.txt", "./resource/Object/笔架山居森林度假酒店.txt",
"./resource/Object/乌镇民宿.txt", "./resource/Object/乌镇民宿.txt"
"./resource/Object/从化客天下·禧悦庄.txt"
] ]
}, },
{ {
"type": "Description", "type": "Description",
"file_path": [ "file_path": [
"./resource/Object/中山温泉宾馆.txt", "./resource/Object/笔架山居森林度假酒店.txt",
"./resource/Object/乌镇民宿.txt", "./resource/Object/乌镇民宿.txt"
"./resource/Object/从化客天下·禧悦庄.txt"
] ]
}, },
{ {

View File

@ -1,7 +1,7 @@
{ {
"date": "4月30日, 4月28日, 5月1日", "date": "4月30日, 4月28日, 5月1日",
"num": 8, "num": 6,
"variants": 5, "variants": 3,
"topic_temperature": 0.2, "topic_temperature": 0.2,
"topic_top_p": 0.3, "topic_top_p": 0.3,
"topic_presence_penalty": 1.5, "topic_presence_penalty": 1.5,
@ -42,13 +42,15 @@
{ {
"type": "Object", "type": "Object",
"file_path": [ "file_path": [
"./resource/Object/中山温泉宾馆.txt" "./resource/Object/笔架山居森林度假酒店.txt",
"./resource/Object/乌镇民宿.txt"
] ]
}, },
{ {
"type": "Description", "type": "Description",
"file_path": [ "file_path": [
"./resource/Object/中山温泉宾馆.txt" "./resource/Object/笔架山居森林度假酒店.txt",
"./resource/Object/乌镇民宿.txt"
] ]
}, },
{ {

View File

@ -58,19 +58,20 @@ def main():
parser.add_argument( parser.add_argument(
"--config", "--config",
type=str, type=str,
default="poster_config.json", default="/root/autodl-tmp/TravelContentCreator/poster_gen_config.json",
help="配置文件路径例如poster_config.json" help="配置文件路径例如poster_config.json"
) )
parser.add_argument( parser.add_argument(
"--topics_file", "--topics_file",
type=str, type=str,
required=True, required=True,
default="/root/autodl-tmp/TravelContentCreator/result/2025-04-25_17-27-03/tweet_topic_2025-04-25_17-27-03.json",
help="必需的选题JSON文件路径用于获取海报生成的主题数据。" help="必需的选题JSON文件路径用于获取海报生成的主题数据。"
) )
parser.add_argument( parser.add_argument(
"--topic_index", "--topic_index",
type=int, type=int,
default=None, default=1,
help="要生成海报的特定选题索引。如果未提供,将为所有选题生成海报。" help="要生成海报的特定选题索引。如果未提供,将为所有选题生成海报。"
) )
parser.add_argument( parser.add_argument(
@ -155,6 +156,9 @@ def main():
collage_subdir = config.get("output_collage_subdir", "collage_img") collage_subdir = config.get("output_collage_subdir", "collage_img")
poster_subdir = config.get("output_poster_subdir", "poster") poster_subdir = config.get("output_poster_subdir", "poster")
poster_filename = config.get("output_poster_filename", "poster.jpg") poster_filename = config.get("output_poster_filename", "poster.jpg")
title_possibility = config.get("title_possibility", 0.3)
collage_style = config.get("collage_style", None)
timeout = config.get("request_timeout", 180)
# 检查关键路径 # 检查关键路径
if not poster_assets_dir or not img_base_dir: if not poster_assets_dir or not img_base_dir:
@ -203,7 +207,10 @@ def main():
output_collage_subdir=collage_subdir, output_collage_subdir=collage_subdir,
output_poster_subdir=poster_subdir, output_poster_subdir=poster_subdir,
output_poster_filename=poster_filename, output_poster_filename=poster_filename,
system_prompt=poster_content_system_prompt system_prompt=poster_content_system_prompt,
collage_style=collage_style,
title_possibility=title_possibility,
timeout=timeout
) )
if posters_attempted: if posters_attempted:
@ -213,7 +220,7 @@ def main():
logging.warning(f"选题{topic_index}的海报生成被跳过或在早期失败。") logging.warning(f"选题{topic_index}的海报生成被跳过或在早期失败。")
except Exception as e: except Exception as e:
logging.exception(f"处理选题{topic_index}的海报生成时出错:") logging.exception(f"处理选题{topic_index}的海报生成时出错:")
logging.error(f"错误信息: {e}")
logging.info(f"--- 完成选题 {topic_index} ---") logging.info(f"--- 完成选题 {topic_index} ---")
# 最终化输出 # 最终化输出