Files
viralfactory/src/engines/ScriptEngine/CustomScriptEngine.py
Paillat bd00a49063 🐛 fix(GenerationContext.py): fix indentation issue in process() method
 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.
2024-02-21 09:06:36 +01:00

26 lines
714 B
Python

from .BaseScriptEngine import BaseScriptEngine
import gradio as gr
class CustomScriptEngine(BaseScriptEngine):
name = "Custom Script Engine"
description = "Generate a script with a custom provided prompt"
num_options = 1
def __init__(self, options: list[list | tuple | str | int | float | bool | None]):
self.script = options[0]
super().__init__()
def generate(self, *args, **kwargs) -> str:
self.ctx.script = self.script.strip().copy()
@classmethod
def get_options(cls) -> list:
return [
gr.Textbox(
label="Prompt",
placeholder="Enter your prompt here",
value="",
)
]