Spaces:
Configuration error
Configuration error
Update app.py
Browse files
app.py
CHANGED
@@ -173,7 +173,7 @@ def generate_riffuse(prompt_start, steps, num_iterations, feel, prompt_end=None,
|
|
173 |
|
174 |
if prompt_end is None:
|
175 |
prompt_end = prompt_start
|
176 |
-
if seed_start
|
177 |
seed_start = random.randint(0,4294967295)
|
178 |
if seed_end is None:
|
179 |
seed_end = seed_start
|
@@ -227,7 +227,7 @@ def wav_list_to_wav(wav_list):
|
|
227 |
|
228 |
###############################################
|
229 |
|
230 |
-
def on_submit(prompt_1, prompt_2,
|
231 |
if prompt_1 == "":
|
232 |
return None, gr.update(value="First prompt is required."), gr.update(visible=False), gr.update(visible=False), gr.update(visible=False)
|
233 |
if prompt_2 == "":
|
@@ -296,7 +296,7 @@ with gr.Blocks(css=css) as app:
|
|
296 |
loading_icon = gr.HTML(loading_icon_html, elem_id="share-btn-loading-icon", visible=False)
|
297 |
share_button = gr.Button("Share to community", elem_id="share-btn", visible=False)
|
298 |
|
299 |
-
inputs = [prompt_1, prompt_2,
|
300 |
outputs = [video, info, community_icon, loading_icon, share_button]
|
301 |
|
302 |
num_iterations.change(on_num_iterations_change, [num_iterations, prompt_2], [info])
|
@@ -307,6 +307,7 @@ with gr.Blocks(css=css) as app:
|
|
307 |
share_button.click(None, [], [], _js=share_js)
|
308 |
|
309 |
examples = gr.Examples(
|
|
|
310 |
examples=[
|
311 |
["typing", "dance beat", "og_beat", 10],
|
312 |
["synthwave", "jazz", "agile", 10],
|
@@ -321,6 +322,7 @@ with gr.Blocks(css=css) as app:
|
|
321 |
["soulful R&B love song", "", "marim", 10],
|
322 |
["country western twangy guitar", "", "agile", 10]],
|
323 |
inputs=[prompt_1, prompt_2, feel, num_iterations],
|
|
|
324 |
cache_examples=True)
|
325 |
|
326 |
gr.HTML("""
|
|
|
173 |
|
174 |
if prompt_end is None:
|
175 |
prompt_end = prompt_start
|
176 |
+
if seed_start == 0:
|
177 |
seed_start = random.randint(0,4294967295)
|
178 |
if seed_end is None:
|
179 |
seed_end = seed_start
|
|
|
227 |
|
228 |
###############################################
|
229 |
|
230 |
+
def on_submit(prompt_1, prompt_2, feel, num_iterations, steps=25, seed=0):
|
231 |
if prompt_1 == "":
|
232 |
return None, gr.update(value="First prompt is required."), gr.update(visible=False), gr.update(visible=False), gr.update(visible=False)
|
233 |
if prompt_2 == "":
|
|
|
296 |
loading_icon = gr.HTML(loading_icon_html, elem_id="share-btn-loading-icon", visible=False)
|
297 |
share_button = gr.Button("Share to community", elem_id="share-btn", visible=False)
|
298 |
|
299 |
+
inputs = [prompt_1, prompt_2, feel, num_iterations, steps, seed]
|
300 |
outputs = [video, info, community_icon, loading_icon, share_button]
|
301 |
|
302 |
num_iterations.change(on_num_iterations_change, [num_iterations, prompt_2], [info])
|
|
|
307 |
share_button.click(None, [], [], _js=share_js)
|
308 |
|
309 |
examples = gr.Examples(
|
310 |
+
fn=on_submit,
|
311 |
examples=[
|
312 |
["typing", "dance beat", "og_beat", 10],
|
313 |
["synthwave", "jazz", "agile", 10],
|
|
|
322 |
["soulful R&B love song", "", "marim", 10],
|
323 |
["country western twangy guitar", "", "agile", 10]],
|
324 |
inputs=[prompt_1, prompt_2, feel, num_iterations],
|
325 |
+
outputs=outputs,
|
326 |
cache_examples=True)
|
327 |
|
328 |
gr.HTML("""
|