scenes
Browse files
App/Generate/generatorRoutes.py
CHANGED
@@ -18,8 +18,8 @@ async def update_scene(model_scene):
|
|
18 |
await model_scene.update(**model_scene.__dict__)
|
19 |
|
20 |
|
21 |
-
async def from_dict_generate(data):
|
22 |
-
generated_strory = Story
|
23 |
await generate_assets(generated_story=generated_strory)
|
24 |
|
25 |
|
@@ -97,7 +97,9 @@ async def generate_video(
|
|
97 |
|
98 |
|
99 |
@generator_router.post("/generate_video_from_json")
|
100 |
-
async def generate_video_from_json(
|
|
|
|
|
101 |
background_task.add_task(from_dict_generate, jsonReq)
|
102 |
return {"task_id": "started"}
|
103 |
|
|
|
18 |
await model_scene.update(**model_scene.__dict__)
|
19 |
|
20 |
|
21 |
+
async def from_dict_generate(data: list[Scene]):
|
22 |
+
generated_strory = Story(scenes=data)
|
23 |
await generate_assets(generated_story=generated_strory)
|
24 |
|
25 |
|
|
|
97 |
|
98 |
|
99 |
@generator_router.post("/generate_video_from_json")
|
100 |
+
async def generate_video_from_json(
|
101 |
+
jsonReq: list[Scene], background_task: BackgroundTasks
|
102 |
+
):
|
103 |
background_task.add_task(from_dict_generate, jsonReq)
|
104 |
return {"task_id": "started"}
|
105 |
|