Spaces:
Running
on
Zero
Running
on
Zero
chong.zhang
commited on
Commit
·
5891900
1
Parent(s):
6eb0a02
update
Browse files
app.py
CHANGED
@@ -134,19 +134,24 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
134 |
output_sample_rate = gr.Dropdown([48000, 24000],
|
135 |
label="Output Audio Sample Rate (Hz)",
|
136 |
value=48000)
|
137 |
-
max_generate_audio_seconds = gr.Slider(10,
|
138 |
-
label="
|
139 |
value=30)
|
140 |
-
with gr.Column():
|
141 |
-
|
142 |
-
|
|
|
|
|
|
|
|
|
|
|
143 |
with gr.Row(equal_height=True):
|
144 |
# Textbox for custom input
|
145 |
text_input = gr.Textbox(label="Input Text (For Text-to-Music Task)", value="Experience soothing and sensual instrumental jazz with a touch of Bossa Nova, perfect for a relaxing restaurant or spa ambiance.")
|
146 |
|
147 |
-
audio_input = gr.Audio(label="Input Prompt
|
148 |
type="filepath")
|
149 |
-
music_output = gr.Audio(label="Generated Music
|
150 |
|
151 |
with gr.Row():
|
152 |
button = gr.Button("Text to Music")
|
|
|
134 |
output_sample_rate = gr.Dropdown([48000, 24000],
|
135 |
label="Output Audio Sample Rate (Hz)",
|
136 |
value=48000)
|
137 |
+
max_generate_audio_seconds = gr.Slider(10, 120,
|
138 |
+
label="Generate Audio Length (s)",
|
139 |
value=30)
|
140 |
+
# with gr.Column():
|
141 |
+
# fast = gr.Checkbox(label="Fast Inference", value=False)
|
142 |
+
# fade_out = gr.Checkbox(label="Apply Fade Out Effect", value=True)
|
143 |
+
if output_sample_rate == 24000:
|
144 |
+
fast = True
|
145 |
+
else:
|
146 |
+
fast = False
|
147 |
+
fade_out = True
|
148 |
with gr.Row(equal_height=True):
|
149 |
# Textbox for custom input
|
150 |
text_input = gr.Textbox(label="Input Text (For Text-to-Music Task)", value="Experience soothing and sensual instrumental jazz with a touch of Bossa Nova, perfect for a relaxing restaurant or spa ambiance.")
|
151 |
|
152 |
+
audio_input = gr.Audio(label="Input Audio Prompt (For Music Continuation Task)",
|
153 |
type="filepath")
|
154 |
+
music_output = gr.Audio(label="Generated Music", type="filepath")
|
155 |
|
156 |
with gr.Row():
|
157 |
button = gr.Button("Text to Music")
|