I have no time to review my commit

This commit is contained in:
2024-02-27 14:24:25 +01:00
parent c70872a0e5
commit 166eff8a8a
23 changed files with 400 additions and 53 deletions

View File

@@ -1,4 +1,6 @@
import gradio as gr
import os
import shutil
from moviepy.editor import TextClip
from . import BaseCaptioningEngine
@@ -80,6 +82,13 @@ class SimpleCaptioningEngine(BaseCaptioningEngine):
self.ctx.index_7.extend(clips)
@classmethod
def get_settings(cls):
gr.Markdown(
"To add a custom font, simply install the font on your system, restart the server, and input the exact "
"file name (without the path) in the dropdown."
)
@classmethod
def get_options(cls) -> list:
with gr.Column() as font_options:
@@ -87,7 +96,8 @@ class SimpleCaptioningEngine(BaseCaptioningEngine):
font = gr.Dropdown(
label="Font",
choices=TextClip.list("font"),
value="Comic-Sans-MS",
value="Comic-Sans-MS-Bold",
allow_custom_value=True, # Allow custom font
)
font_size = gr.Number(
label="Font Size",