Fix async generator syntax errors in tab files
Changed return statements to yield + return in async generator functions. Python doesn't allow 'return' with a value in generators. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -161,7 +161,7 @@ def create_audiogen_tab(
|
||||
prompt, variant, duration, temperature, cfg_coef, top_k, top_p, seed
|
||||
):
|
||||
if not prompt:
|
||||
return (
|
||||
yield (
|
||||
gr.update(value="Please enter a prompt"),
|
||||
gr.update(),
|
||||
gr.update(),
|
||||
@@ -169,6 +169,7 @@ def create_audiogen_tab(
|
||||
gr.update(),
|
||||
gr.update(),
|
||||
)
|
||||
return
|
||||
|
||||
yield (
|
||||
gr.update(value="🔄 Generating..."),
|
||||
|
||||
@@ -217,7 +217,7 @@ def create_jasco_tab(
|
||||
prompt, variant, chords, drums, duration, bpm, temperature, cfg_coef, top_k, top_p, seed
|
||||
):
|
||||
if not chords:
|
||||
return (
|
||||
yield (
|
||||
gr.update(value="Please enter a chord progression"),
|
||||
gr.update(),
|
||||
gr.update(),
|
||||
@@ -225,6 +225,7 @@ def create_jasco_tab(
|
||||
gr.update(),
|
||||
gr.update(),
|
||||
)
|
||||
return
|
||||
|
||||
yield (
|
||||
gr.update(value="🔄 Generating..."),
|
||||
|
||||
@@ -184,7 +184,7 @@ def create_magnet_tab(
|
||||
prompt, variant, duration, temperature, cfg_coef, top_k, top_p, decoding_steps, span_arr, seed
|
||||
):
|
||||
if not prompt:
|
||||
return (
|
||||
yield (
|
||||
gr.update(value="Please enter a prompt"),
|
||||
gr.update(),
|
||||
gr.update(),
|
||||
@@ -192,6 +192,7 @@ def create_magnet_tab(
|
||||
gr.update(),
|
||||
gr.update(),
|
||||
)
|
||||
return
|
||||
|
||||
yield (
|
||||
gr.update(value="🔄 Generating..."),
|
||||
|
||||
@@ -189,7 +189,7 @@ def create_musicgen_tab(
|
||||
prompt, variant, duration, temperature, cfg_coef, top_k, top_p, seed, melody
|
||||
):
|
||||
if not prompt:
|
||||
return (
|
||||
yield (
|
||||
gr.update(value="Please enter a prompt"),
|
||||
gr.update(),
|
||||
gr.update(),
|
||||
@@ -197,6 +197,7 @@ def create_musicgen_tab(
|
||||
gr.update(),
|
||||
gr.update(),
|
||||
)
|
||||
return
|
||||
|
||||
# Update status
|
||||
yield (
|
||||
|
||||
@@ -161,7 +161,7 @@ def create_style_tab(
|
||||
prompt, variant, style_audio, duration, temperature, cfg_coef, top_k, top_p, seed
|
||||
):
|
||||
if not style_audio:
|
||||
return (
|
||||
yield (
|
||||
gr.update(value="Please upload a style reference audio"),
|
||||
gr.update(),
|
||||
gr.update(),
|
||||
@@ -169,6 +169,7 @@ def create_style_tab(
|
||||
gr.update(),
|
||||
gr.update(),
|
||||
)
|
||||
return
|
||||
|
||||
yield (
|
||||
gr.update(value="🔄 Generating..."),
|
||||
|
||||
Reference in New Issue
Block a user