Spaces:
Configuration error
Configuration error
Update app.py
Browse files
app.py
CHANGED
@@ -227,11 +227,11 @@ def wav_list_to_wav(wav_list):
|
|
227 |
|
228 |
def on_submit(prompt_1, prompt_2, steps, num_iterations, feel, seed):
|
229 |
if prompt_1 == "":
|
230 |
-
return None, gr.update(value="First prompt is required.")
|
231 |
if prompt_2 == "":
|
232 |
-
return generate(prompt_1, steps, num_iterations, feel, seed), None, gr.update(visible=True)
|
233 |
else:
|
234 |
-
return generate_riffuse(prompt_1, steps, num_iterations, feel, prompt_end=prompt_2, seed_start=seed), None, gr.update(visible=True)
|
235 |
|
236 |
|
237 |
def on_num_iterations_change(n, prompt_2):
|
@@ -289,13 +289,13 @@ with gr.Blocks(css=css) as app:
|
|
289 |
with gr.Column():
|
290 |
video = gr.Video(elem_id="riff-video")
|
291 |
|
292 |
-
with gr.
|
293 |
community_icon = gr.HTML(community_icon_html, visible=False)
|
294 |
loading_icon = gr.HTML(loading_icon_html, visible=False)
|
295 |
share_button = gr.Button("Share to community", elem_id="share-btn", visible=False)
|
296 |
|
297 |
inputs = [prompt_1, prompt_2, steps, num_iterations, feel, seed]
|
298 |
-
outputs = [video, info,
|
299 |
|
300 |
num_iterations.change(on_num_iterations_change, [num_iterations, prompt_2], [info])
|
301 |
prompt_1.submit(on_submit, inputs, outputs)
|
|
|
227 |
|
228 |
def on_submit(prompt_1, prompt_2, steps, num_iterations, feel, seed):
|
229 |
if prompt_1 == "":
|
230 |
+
return None, gr.update(value="First prompt is required."), gr.update(visible=False), gr.update(visible=False), gr.update(visible=False)
|
231 |
if prompt_2 == "":
|
232 |
+
return generate(prompt_1, steps, num_iterations, feel, seed), None, gr.update(visible=True), gr.update(visible=True), gr.update(visible=True)
|
233 |
else:
|
234 |
+
return generate_riffuse(prompt_1, steps, num_iterations, feel, prompt_end=prompt_2, seed_start=seed), None, gr.update(visible=True), gr.update(visible=True), gr.update(visible=True)
|
235 |
|
236 |
|
237 |
def on_num_iterations_change(n, prompt_2):
|
|
|
289 |
with gr.Column():
|
290 |
video = gr.Video(elem_id="riff-video")
|
291 |
|
292 |
+
with gr.Group(elem_id="share-btn-container"):
|
293 |
community_icon = gr.HTML(community_icon_html, visible=False)
|
294 |
loading_icon = gr.HTML(loading_icon_html, visible=False)
|
295 |
share_button = gr.Button("Share to community", elem_id="share-btn", visible=False)
|
296 |
|
297 |
inputs = [prompt_1, prompt_2, steps, num_iterations, feel, seed]
|
298 |
+
outputs = [video, info, community_icon, loading_icon, share_button]
|
299 |
|
300 |
num_iterations.change(on_num_iterations_change, [num_iterations, prompt_2], [info])
|
301 |
prompt_1.submit(on_submit, inputs, outputs)
|