Update app.py
Browse files
app.py
CHANGED
@@ -129,11 +129,11 @@ def get_output_video(text):
|
|
129 |
fontsize = 20 # Increased font size
|
130 |
path_font = "/usr/share/fonts/truetype/liberation/LiberationSans-Bold.ttf"
|
131 |
if not os.path.exists(path_font):
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
|
138 |
if path_font is not None:
|
139 |
try:
|
@@ -254,7 +254,7 @@ with demo:
|
|
254 |
# Left column (inputs)
|
255 |
with gr.Column():
|
256 |
input_start_text = gr.Textbox(value=text,
|
257 |
-
|
258 |
with gr.Row():
|
259 |
button_gen_video = gr.Button("Generate Video")
|
260 |
# Right column (outputs)
|
|
|
129 |
fontsize = 20 # Increased font size
|
130 |
path_font = "/usr/share/fonts/truetype/liberation/LiberationSans-Bold.ttf"
|
131 |
if not os.path.exists(path_font):
|
132 |
+
# Try alternative location on different systems
|
133 |
+
path_font = "/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf"
|
134 |
+
if not os.path.exists(path_font):
|
135 |
+
print("Font file not found. Subtitles might not be rendered correctly.")
|
136 |
+
path_font = None
|
137 |
|
138 |
if path_font is not None:
|
139 |
try:
|
|
|
254 |
# Left column (inputs)
|
255 |
with gr.Column():
|
256 |
input_start_text = gr.Textbox(value=text,
|
257 |
+
label="Type your story here, for now a sample story is added already!")
|
258 |
with gr.Row():
|
259 |
button_gen_video = gr.Button("Generate Video")
|
260 |
# Right column (outputs)
|