mirror of
https://github.com/Paillat-dev/viralfactory.git
synced 2026-01-02 17:24:54 +00:00
✨ feat(GenerationContext.py): add support for z-index of moviepy clips to improve video rendering
The indentation issue in the process() method has been fixed. The z-index of moviepy clips has been added to improve the rendering of the video. This allows the clips to be rendered in different layers based on their index, resulting in a more visually appealing video.
30 lines
825 B
Python
30 lines
825 B
Python
from . import BaseMetadataEngine
|
|
|
|
from ...utils.prompting import get_prompt
|
|
|
|
|
|
class ShortsMetadataEngine(BaseMetadataEngine):
|
|
name = "ShortsMetadata"
|
|
description = "Generate metadata for YouTube Shorts / TikTok format videos"
|
|
|
|
num_options = 0
|
|
|
|
def __init__(self, **kwargs) -> None:
|
|
...
|
|
|
|
def get_metadata(self):
|
|
sytsem_prompt, chat_prompt = get_prompt(
|
|
"ShortsMetadata", by_file_location=__file__
|
|
)
|
|
chat_prompt = chat_prompt.replace("{script}", self.ctx.script)
|
|
|
|
result = self.ctx.simplellmengine.generate(
|
|
chat_prompt=chat_prompt, system_prompt=sytsem_prompt, json_mode=True
|
|
)
|
|
self.ctx.title = result["title"]
|
|
self.ctx.description = result["description"]
|
|
|
|
@classmethod
|
|
def get_options(cls):
|
|
return []
|