taskManager / taskMap.py
rogerxavier's picture
Update taskMap.py
a02077e verified
raw
history blame
1.72 kB
from task import _0上传遮罩, _1批量顺序上传原始图片到服务器manga, _2发送任务请求一次执行全部流程, \
_3检测output_video效果
bili_meta_data = {
"act_reserve_create": 0,
"copyright": 1, # 2是转载
"source": "",
"desc": '點精心设计乳猪份巷',
"desc_format_id": 0,
"dynamic": "",
"interactive": 0,
"no_reprint": 1,
"open_elec": 0,
"origin_state": 0,
"subtitles": {
"lan": "",
"open": 0
},
"tag": "动漫解说,漫画, 标动画,动漫杂谈,恋爱,吐槽,漫画推荐",
"tid": 210,
"title": '鬼畜英雄13',
"up_close_danmaku": False,
"up_close_reply": False,
"up_selection_reply": False,
"dtime": 0
}
defaultBaseUrl = 'https://rogerxavier-moviepy-with-manga-test.hf.space'#比如https否则method not allowed
# 函数映射简化执行输入
# 定义任务函数映射字典
task_functions = {
"0": _0上传遮罩.upload_mask_to_space,
"1": _1批量顺序上传原始图片到服务器manga.upload_manga_to_space,
"2": _2发送任务请求一次执行全部流程.task_submit_to_space,
"3": _3检测output_video效果.download_output_video
}
# 定义函数名称和参数的元组列表,可以用**的写法将dict传递参数字典给函数
tasks_params = {
"0": {"baseUrl": defaultBaseUrl, "mask_path": 'mask'},
"1": {"baseUrl": defaultBaseUrl, "manga_path": 'manga'},
"2": {"baseUrl": defaultBaseUrl,
"task_list": ["0filterImage", "1removeMask", "2magiDialogCut", "3mergeDialogToVideo"],
"bili_meta": bili_meta_data, "allow_submit": True
},
"3": {"baseUrl": defaultBaseUrl, "save_path": "output_video.mp4"}
}