Spaces:
Running
on
T4
Running
on
T4
Typo fix
Browse files
app.py
CHANGED
@@ -179,7 +179,7 @@ def load_background_filepath(video_orientation):
|
|
179 |
Get the background image path based on video orientation.
|
180 |
|
181 |
Args:
|
182 |
-
video_orientation (str): Either 'Landscape' or '
|
183 |
|
184 |
Returns:
|
185 |
str: Path to the background image file.
|
@@ -466,7 +466,7 @@ def predict(model, text, melody_filepath, duration, dimension, topk, topp, tempe
|
|
466 |
output = output.detach().cpu().float()[0]
|
467 |
|
468 |
video_width, video_height = 768, 512
|
469 |
-
if video_orientation == "
|
470 |
video_width, video_height = 512, 768
|
471 |
|
472 |
title_file_name = convert_title_to_filename(title)
|
@@ -628,7 +628,7 @@ def ui(**kwargs):
|
|
628 |
with gr.Column():
|
629 |
include_title = gr.Checkbox(label="Add Title", value=True, interactive=True,key="add_title")
|
630 |
include_settings = gr.Checkbox(label="Add Settings to background", value=True, interactive=True, key="add_settings")
|
631 |
-
video_orientation = gr.Radio(label="Video Orientation", choices=["Landscape", "
|
632 |
with gr.Row():
|
633 |
title = gr.Textbox(label="Title", value="UnlimitedMusicGen", interactive=True, key="song_title")
|
634 |
settings_font = gr.Text(label="Settings Font", value="./assets/arial.ttf", interactive=True)
|
|
|
179 |
Get the background image path based on video orientation.
|
180 |
|
181 |
Args:
|
182 |
+
video_orientation (str): Either 'Landscape' or 'Portrait'.
|
183 |
|
184 |
Returns:
|
185 |
str: Path to the background image file.
|
|
|
466 |
output = output.detach().cpu().float()[0]
|
467 |
|
468 |
video_width, video_height = 768, 512
|
469 |
+
if video_orientation == "Portrait":
|
470 |
video_width, video_height = 512, 768
|
471 |
|
472 |
title_file_name = convert_title_to_filename(title)
|
|
|
628 |
with gr.Column():
|
629 |
include_title = gr.Checkbox(label="Add Title", value=True, interactive=True,key="add_title")
|
630 |
include_settings = gr.Checkbox(label="Add Settings to background", value=True, interactive=True, key="add_settings")
|
631 |
+
video_orientation = gr.Radio(label="Video Orientation", choices=["Landscape", "Portrait"], value="Landscape", interactive=True, key="video_orientation")
|
632 |
with gr.Row():
|
633 |
title = gr.Textbox(label="Title", value="UnlimitedMusicGen", interactive=True, key="song_title")
|
634 |
settings_font = gr.Text(label="Settings Font", value="./assets/arial.ttf", interactive=True)
|