mirror of
https://github.com/Paillat-dev/viralfactory.git
synced 2026-01-02 01:06:19 +00:00
I have no time to review my commit
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user