rogerxavier
commited on
Commit
•
be43bb0
1
Parent(s):
7da9800
Update api.py
Browse files
api.py
CHANGED
@@ -103,11 +103,13 @@ async def execute_py_file(file_name: str,background_tasks: BackgroundTasks):
|
|
103 |
|
104 |
#保证既要提交队列后返回给用户,又要先完成前面的video生成步骤再执行后面的submit函数,还有兼顾allow_submit的值
|
105 |
@app.get("/execute_all_task")
|
106 |
-
async def execute_all_task(background_tasks: BackgroundTasks, file_list: List[str] = Query(["1removeMask", "2magiDialogCut", "3mergeDialogToVideo"]),
|
107 |
-
|
108 |
allow_submit: bool = False, cover_path: str = '/cover'
|
109 |
):
|
110 |
-
print("获取到的用户bili_meta_data是:",bili_meta_data)
|
|
|
|
|
111 |
|
112 |
background_tasks.add_task(process_tasks_and_upload, file_list, bili_meta_data, cover_image, cover_path,allow_submit,background_tasks)
|
113 |
return {"message": "提交成功"}
|
|
|
103 |
|
104 |
#保证既要提交队列后返回给用户,又要先完成前面的video生成步骤再执行后面的submit函数,还有兼顾allow_submit的值
|
105 |
@app.get("/execute_all_task")
|
106 |
+
async def execute_all_task(background_tasks: BackgroundTasks, bili_meta_data,file_list: List[str] = Query(["1removeMask", "2magiDialogCut", "3mergeDialogToVideo"]),
|
107 |
+
cover_image: UploadFile = File(...), mp4_out_file: str = 'mp4_out/output.mp4',
|
108 |
allow_submit: bool = False, cover_path: str = '/cover'
|
109 |
):
|
110 |
+
print("获取到的用户bili_meta_data是:", bili_meta_data)
|
111 |
+
print("获取到的file_list是",file_list)
|
112 |
+
print("获取到的allow_submit是",allow_submit)
|
113 |
|
114 |
background_tasks.add_task(process_tasks_and_upload, file_list, bili_meta_data, cover_image, cover_path,allow_submit,background_tasks)
|
115 |
return {"message": "提交成功"}
|