Spaces:
Paused
Paused
feat: redesign Tune Studio as an Idea, Lyrics and Music column flow
Browse files
README.md
CHANGED
|
@@ -21,9 +21,10 @@ Type a topic and pick a style. The app writes English lyrics with DeepSeek V4.1
|
|
| 21 |
## Using the app
|
| 22 |
|
| 23 |
1. Open **Settings** and paste a Hugging Face token with the *Make calls to Inference Providers* permission. The token is stored only in your browser.
|
| 24 |
-
2.
|
| 25 |
3. Optional: open **Advanced** to choose symbolic planning (melody + chords, melody only, or no score), render quality (16 or 32 steps), and the seed.
|
| 26 |
-
4.
|
|
|
|
| 27 |
|
| 28 |
## Run locally
|
| 29 |
|
|
|
|
| 21 |
## Using the app
|
| 22 |
|
| 23 |
1. Open **Settings** and paste a Hugging Face token with the *Make calls to Inference Providers* permission. The token is stored only in your browser.
|
| 24 |
+
2. In **1 · Idea**, type your topic, pick a style, and click **Create song**. After the first song this button reads **New song** and always makes new lyrics and new music.
|
| 25 |
3. Optional: open **Advanced** to choose symbolic planning (melody + chords, melody only, or no score), render quality (16 or 32 steps), and the seed.
|
| 26 |
+
4. In **2 · Lyrics**, **Rewrite lyrics · keep melody** writes new words with the same sections and sings them on the same score, style, and seed. It needs a song made with a score, so it is off for "No score" songs.
|
| 27 |
+
5. In **3 · Music**, **New music · keep lyrics** composes a new score for the same lyrics, using the current style and Advanced settings from column 1.
|
| 28 |
|
| 29 |
## Run locally
|
| 30 |
|
app.py
CHANGED
|
@@ -21,40 +21,48 @@ STYLE_PRESETS = {
|
|
| 21 |
PLANNING_CHOICES = [("Melody + chords", "full"), ("Melody only", "melody"), ("No score", "off")]
|
| 22 |
QUALITY_CHOICES = [("Fast · 16 steps", 16), ("Best quality · 32 steps", 32)]
|
| 23 |
MAX_SEED = 2**31 - 1
|
|
|
|
| 24 |
|
| 25 |
CSS = """
|
| 26 |
-
#page { max-width:
|
| 27 |
-
.hero { text-align: center; padding-top:
|
| 28 |
-
.hero h1 { font-size:
|
| 29 |
.hero p { opacity: 0.75; margin-top: 0; }
|
| 30 |
-
#
|
|
|
|
|
|
|
|
|
|
| 31 |
"""
|
| 32 |
|
| 33 |
HERO_HTML = """
|
| 34 |
<div class="hero">
|
| 35 |
-
<h1>
|
| 36 |
-
<p>
|
| 37 |
</div>
|
| 38 |
"""
|
| 39 |
|
| 40 |
writer = HfLyricsWriter()
|
| 41 |
-
|
| 42 |
-
|
| 43 |
KEEP = object()
|
| 44 |
|
| 45 |
|
| 46 |
-
def
|
| 47 |
-
|
| 48 |
-
def value(item, convert=lambda x: x):
|
| 49 |
-
return gr.skip() if item is KEEP else convert(item)
|
| 50 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
return (
|
| 52 |
status,
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
|
|
|
|
|
|
|
|
|
| 58 |
)
|
| 59 |
|
| 60 |
|
|
@@ -64,6 +72,10 @@ def pick_seed(seed, randomize: bool) -> int:
|
|
| 64 |
return int(seed)
|
| 65 |
|
| 66 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
def verify_token(token: str):
|
| 68 |
token = (token or "").strip()
|
| 69 |
if not token:
|
|
@@ -79,8 +91,12 @@ def remove_token():
|
|
| 79 |
return "", "", "Token removed from this browser."
|
| 80 |
|
| 81 |
|
| 82 |
-
def render(song: dict):
|
| 83 |
-
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
| 84 |
try:
|
| 85 |
audio_path, abc = render_song(
|
| 86 |
song["style"], song["lyrics"], song["seed"], song["cot"], song["steps"], song.get("abc")
|
|
@@ -88,20 +104,15 @@ def render(song: dict):
|
|
| 88 |
except Exception as exc:
|
| 89 |
logger.exception("Song rendering failed")
|
| 90 |
message = exc.message if isinstance(exc, gr.Error) else "Something went wrong while making the song."
|
| 91 |
-
yield
|
| 92 |
return
|
| 93 |
song = {**song, "abc": abc}
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
lyrics=song["lyrics"],
|
| 97 |
-
audio=audio_path,
|
| 98 |
-
seed=song["seed"],
|
| 99 |
-
remix=abc is not None,
|
| 100 |
-
song=song,
|
| 101 |
-
)
|
| 102 |
|
| 103 |
|
| 104 |
-
def
|
|
|
|
| 105 |
topic = (topic or "").strip()
|
| 106 |
token = (token or "").strip()
|
| 107 |
if len(topic) < 3:
|
|
@@ -109,49 +120,69 @@ def create_song(topic, style_label, custom_style, cot, steps, seed, randomize, t
|
|
| 109 |
if not token:
|
| 110 |
raise gr.Error("Add your Hugging Face token in Settings first.")
|
| 111 |
|
| 112 |
-
yield
|
| 113 |
try:
|
| 114 |
lyrics = writer.write(topic, token)
|
| 115 |
except LyricsError as exc:
|
| 116 |
-
yield
|
| 117 |
return
|
| 118 |
|
| 119 |
song = {
|
| 120 |
"topic": topic,
|
| 121 |
-
"style": (
|
| 122 |
"lyrics": lyrics,
|
| 123 |
"seed": pick_seed(seed, randomize),
|
| 124 |
"cot": cot,
|
| 125 |
"steps": int(steps),
|
| 126 |
"abc": None,
|
| 127 |
}
|
| 128 |
-
yield
|
| 129 |
-
|
|
|
|
| 130 |
|
| 131 |
|
| 132 |
-
def rewrite_lyrics(direction,
|
|
|
|
| 133 |
token = (token or "").strip()
|
| 134 |
-
if not
|
| 135 |
-
raise gr.Error("
|
| 136 |
if not token:
|
| 137 |
raise gr.Error("Add your Hugging Face token in Settings first.")
|
| 138 |
|
| 139 |
-
yield
|
| 140 |
try:
|
| 141 |
-
lyrics = writer.rewrite(
|
| 142 |
except LyricsError as exc:
|
| 143 |
-
yield
|
| 144 |
return
|
| 145 |
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
yield from render(song)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 150 |
|
| 151 |
|
| 152 |
with gr.Blocks(title="Tune Studio", theme=gr.themes.Soft(primary_hue="violet"), css=CSS) as demo:
|
| 153 |
token_state = gr.BrowserState("")
|
| 154 |
-
|
| 155 |
|
| 156 |
with gr.Column(elem_id="page"):
|
| 157 |
gr.HTML(HERO_HTML)
|
|
@@ -168,68 +199,100 @@ with gr.Blocks(title="Tune Studio", theme=gr.themes.Soft(primary_hue="violet"),
|
|
| 168 |
remove_button = gr.Button("Remove token", variant="stop")
|
| 169 |
settings_status = gr.Markdown()
|
| 170 |
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
|
| 174 |
-
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
|
| 211 |
-
|
| 212 |
-
|
| 213 |
-
|
| 214 |
-
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 218 |
gr.Markdown(
|
| 219 |
"Lyrics: DeepSeek V4.1 Flash via Hugging Face Inference Providers, billed to your account. "
|
| 220 |
-
"Music: YuE2-3B. Model weights are CC BY-NC 4.0."
|
|
|
|
| 221 |
)
|
| 222 |
|
| 223 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 224 |
demo.load(lambda saved: saved, token_state, token_input)
|
| 225 |
verify_button.click(verify_token, token_input, [settings_status, token_state])
|
| 226 |
remove_button.click(remove_token, None, [token_input, token_state, settings_status])
|
| 227 |
create_button.click(
|
| 228 |
-
|
| 229 |
-
[topic_input,
|
| 230 |
-
|
| 231 |
-
results,
|
| 232 |
)
|
| 233 |
-
|
|
|
|
| 234 |
|
| 235 |
demo.queue(default_concurrency_limit=1).launch()
|
|
|
|
| 21 |
PLANNING_CHOICES = [("Melody + chords", "full"), ("Melody only", "melody"), ("No score", "off")]
|
| 22 |
QUALITY_CHOICES = [("Fast · 16 steps", 16), ("Best quality · 32 steps", 32)]
|
| 23 |
MAX_SEED = 2**31 - 1
|
| 24 |
+
RENDER_WAIT = "This usually takes a few minutes."
|
| 25 |
|
| 26 |
CSS = """
|
| 27 |
+
#page { max-width: 1400px; margin: 0 auto; }
|
| 28 |
+
.hero { text-align: center; padding-top: 8px; }
|
| 29 |
+
.hero h1 { font-size: 1.9rem; margin-bottom: 2px; }
|
| 30 |
.hero p { opacity: 0.75; margin-top: 0; }
|
| 31 |
+
#status { min-height: 1.6em; text-align: center; font-weight: 600; }
|
| 32 |
+
.step-title h3 { margin: 0; }
|
| 33 |
+
.hint { opacity: 0.7; font-size: 0.88rem; }
|
| 34 |
+
#score textarea { font-family: ui-monospace, Consolas, monospace; font-size: 0.85rem; }
|
| 35 |
"""
|
| 36 |
|
| 37 |
HERO_HTML = """
|
| 38 |
<div class="hero">
|
| 39 |
+
<h1>Tune Studio</h1>
|
| 40 |
+
<p>Type a topic. We write English lyrics, compose a score, and sing it.</p>
|
| 41 |
</div>
|
| 42 |
"""
|
| 43 |
|
| 44 |
writer = HfLyricsWriter()
|
|
|
|
|
|
|
| 45 |
KEEP = object()
|
| 46 |
|
| 47 |
|
| 48 |
+
def keep_or(item):
|
| 49 |
+
return gr.skip() if item is KEEP else item
|
|
|
|
|
|
|
| 50 |
|
| 51 |
+
|
| 52 |
+
def results(status, song, *, busy=False, lyrics=KEEP, audio=KEEP, score=KEEP, seed=KEEP):
|
| 53 |
+
"""Values for every result component. Button states follow `song` and whether a job runs."""
|
| 54 |
+
has_song = bool(song)
|
| 55 |
+
can_rewrite = has_song and bool(song.get("abc"))
|
| 56 |
return (
|
| 57 |
status,
|
| 58 |
+
keep_or(lyrics),
|
| 59 |
+
keep_or(audio),
|
| 60 |
+
keep_or(score),
|
| 61 |
+
keep_or(seed),
|
| 62 |
+
gr.update(interactive=not busy, value="New song" if has_song else "Create song"),
|
| 63 |
+
gr.update(interactive=not busy and can_rewrite),
|
| 64 |
+
gr.update(interactive=not busy and has_song),
|
| 65 |
+
song,
|
| 66 |
)
|
| 67 |
|
| 68 |
|
|
|
|
| 72 |
return int(seed)
|
| 73 |
|
| 74 |
|
| 75 |
+
def chosen_style(style_label: str, custom_style: str) -> str:
|
| 76 |
+
return (custom_style or "").strip() or STYLE_PRESETS[style_label]
|
| 77 |
+
|
| 78 |
+
|
| 79 |
def verify_token(token: str):
|
| 80 |
token = (token or "").strip()
|
| 81 |
if not token:
|
|
|
|
| 91 |
return "", "", "Token removed from this browser."
|
| 92 |
|
| 93 |
|
| 94 |
+
def render(song: dict, success: str):
|
| 95 |
+
"""Sing `song` on the GPU and yield the finished result or an error.
|
| 96 |
+
|
| 97 |
+
On failure the new lyrics are kept, so "New music · keep lyrics" can retry without
|
| 98 |
+
writing them again.
|
| 99 |
+
"""
|
| 100 |
try:
|
| 101 |
audio_path, abc = render_song(
|
| 102 |
song["style"], song["lyrics"], song["seed"], song["cot"], song["steps"], song.get("abc")
|
|
|
|
| 104 |
except Exception as exc:
|
| 105 |
logger.exception("Song rendering failed")
|
| 106 |
message = exc.message if isinstance(exc, gr.Error) else "Something went wrong while making the song."
|
| 107 |
+
yield results(f"Could not make the song: {message}", song, audio=None, score="")
|
| 108 |
return
|
| 109 |
song = {**song, "abc": abc}
|
| 110 |
+
score = abc or "No score for this song: it was made with 'No score' planning."
|
| 111 |
+
yield results(success, song, audio=audio_path, score=score, seed=song["seed"])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 112 |
|
| 113 |
|
| 114 |
+
def new_song(topic, style_label, custom_style, cot, steps, seed, randomize, token, current):
|
| 115 |
+
"""New lyrics, new score and new audio from the topic."""
|
| 116 |
topic = (topic or "").strip()
|
| 117 |
token = (token or "").strip()
|
| 118 |
if len(topic) < 3:
|
|
|
|
| 120 |
if not token:
|
| 121 |
raise gr.Error("Add your Hugging Face token in Settings first.")
|
| 122 |
|
| 123 |
+
yield results("Step 1 of 2 · Writing lyrics…", current, busy=True)
|
| 124 |
try:
|
| 125 |
lyrics = writer.write(topic, token)
|
| 126 |
except LyricsError as exc:
|
| 127 |
+
yield results(f"Could not write lyrics: {exc}", current)
|
| 128 |
return
|
| 129 |
|
| 130 |
song = {
|
| 131 |
"topic": topic,
|
| 132 |
+
"style": chosen_style(style_label, custom_style),
|
| 133 |
"lyrics": lyrics,
|
| 134 |
"seed": pick_seed(seed, randomize),
|
| 135 |
"cot": cot,
|
| 136 |
"steps": int(steps),
|
| 137 |
"abc": None,
|
| 138 |
}
|
| 139 |
+
yield results(f"Step 2 of 2 · Composing and singing. {RENDER_WAIT}", current, busy=True,
|
| 140 |
+
lyrics=lyrics, audio=None, score="", seed=song["seed"])
|
| 141 |
+
yield from render(song, "Your song is ready.")
|
| 142 |
|
| 143 |
|
| 144 |
+
def rewrite_lyrics(direction, token, current):
|
| 145 |
+
"""New lyrics sung on the current song's score, style and seed."""
|
| 146 |
token = (token or "").strip()
|
| 147 |
+
if not current or not current.get("abc"):
|
| 148 |
+
raise gr.Error("Make a song with a score first, then rewrite its lyrics.")
|
| 149 |
if not token:
|
| 150 |
raise gr.Error("Add your Hugging Face token in Settings first.")
|
| 151 |
|
| 152 |
+
yield results("Step 1 of 2 · Writing new lyrics for the same melody…", current, busy=True)
|
| 153 |
try:
|
| 154 |
+
lyrics = writer.rewrite(current["topic"], current["lyrics"], direction or "", token)
|
| 155 |
except LyricsError as exc:
|
| 156 |
+
yield results(f"Could not write new lyrics: {exc}", current)
|
| 157 |
return
|
| 158 |
|
| 159 |
+
song = {**current, "lyrics": lyrics}
|
| 160 |
+
yield results(f"Step 2 of 2 · Singing the new lyrics on the same melody. {RENDER_WAIT}", current,
|
| 161 |
+
busy=True, lyrics=lyrics, audio=None)
|
| 162 |
+
yield from render(song, "New lyrics are ready on the same melody.")
|
| 163 |
+
|
| 164 |
+
|
| 165 |
+
def new_music(style_label, custom_style, cot, steps, seed, randomize, current):
|
| 166 |
+
"""A new score and audio for the current lyrics, using the settings in the Idea column."""
|
| 167 |
+
if not current:
|
| 168 |
+
raise gr.Error("Make a song first, then make new music for its lyrics.")
|
| 169 |
+
|
| 170 |
+
song = {
|
| 171 |
+
**current,
|
| 172 |
+
"style": chosen_style(style_label, custom_style),
|
| 173 |
+
"seed": pick_seed(seed, randomize),
|
| 174 |
+
"cot": cot,
|
| 175 |
+
"steps": int(steps),
|
| 176 |
+
"abc": None,
|
| 177 |
+
}
|
| 178 |
+
yield results(f"Composing new music for the same lyrics. {RENDER_WAIT}", current, busy=True,
|
| 179 |
+
audio=None, score="", seed=song["seed"])
|
| 180 |
+
yield from render(song, "New music is ready for the same lyrics.")
|
| 181 |
|
| 182 |
|
| 183 |
with gr.Blocks(title="Tune Studio", theme=gr.themes.Soft(primary_hue="violet"), css=CSS) as demo:
|
| 184 |
token_state = gr.BrowserState("")
|
| 185 |
+
current_song = gr.State(None)
|
| 186 |
|
| 187 |
with gr.Column(elem_id="page"):
|
| 188 |
gr.HTML(HERO_HTML)
|
|
|
|
| 199 |
remove_button = gr.Button("Remove token", variant="stop")
|
| 200 |
settings_status = gr.Markdown()
|
| 201 |
|
| 202 |
+
status = gr.Markdown(elem_id="status")
|
| 203 |
+
|
| 204 |
+
with gr.Row(equal_height=False):
|
| 205 |
+
with gr.Column(variant="panel", min_width=320):
|
| 206 |
+
gr.Markdown("### 1 · Idea", elem_classes="step-title")
|
| 207 |
+
topic_input = gr.Textbox(
|
| 208 |
+
label="Topic",
|
| 209 |
+
placeholder="e.g. a rainy night in the city, missing someone who left",
|
| 210 |
+
lines=3,
|
| 211 |
+
max_lines=5,
|
| 212 |
+
)
|
| 213 |
+
style_input = gr.Radio(choices=list(STYLE_PRESETS), value="Pop", label="Style")
|
| 214 |
+
with gr.Accordion("Describe your own style (optional)", open=False):
|
| 215 |
+
custom_style_input = gr.Textbox(
|
| 216 |
+
placeholder="e.g. jazz piano, smooth male vocal",
|
| 217 |
+
show_label=False,
|
| 218 |
+
)
|
| 219 |
+
with gr.Accordion("Advanced", open=False):
|
| 220 |
+
planning_input = gr.Radio(
|
| 221 |
+
choices=PLANNING_CHOICES,
|
| 222 |
+
value="full",
|
| 223 |
+
label="Symbolic planning",
|
| 224 |
+
info="The model writes a score, then sings it. 'No score' skips the score, "
|
| 225 |
+
"so that song's lyrics cannot be rewritten on the same melody.",
|
| 226 |
+
)
|
| 227 |
+
quality_input = gr.Radio(choices=QUALITY_CHOICES, value=16, label="Render quality")
|
| 228 |
+
with gr.Row():
|
| 229 |
+
seed_input = gr.Number(value=42, precision=0, minimum=0, maximum=MAX_SEED, label="Seed")
|
| 230 |
+
randomize_input = gr.Checkbox(value=True, label="New random seed each time")
|
| 231 |
+
create_button = gr.Button("Create song", variant="primary", size="lg")
|
| 232 |
+
gr.Markdown("Writes new lyrics and new music from your topic.", elem_classes="hint")
|
| 233 |
+
|
| 234 |
+
with gr.Column(variant="panel", min_width=320):
|
| 235 |
+
gr.Markdown("### 2 · Lyrics", elem_classes="step-title")
|
| 236 |
+
lyrics_output = gr.Textbox(
|
| 237 |
+
label="Lyrics",
|
| 238 |
+
lines=16,
|
| 239 |
+
max_lines=30,
|
| 240 |
+
interactive=False,
|
| 241 |
+
show_copy_button=True,
|
| 242 |
+
)
|
| 243 |
+
direction_input = gr.Textbox(
|
| 244 |
+
label="What should change? (optional)",
|
| 245 |
+
placeholder="e.g. more hopeful, mention the ocean",
|
| 246 |
+
)
|
| 247 |
+
rewrite_button = gr.Button("Rewrite lyrics · keep melody", interactive=False)
|
| 248 |
+
gr.Markdown(
|
| 249 |
+
"Writes new words with the same sections and sings them on the same score, style and seed.",
|
| 250 |
+
elem_classes="hint",
|
| 251 |
+
)
|
| 252 |
+
|
| 253 |
+
with gr.Column(variant="panel", min_width=320):
|
| 254 |
+
gr.Markdown("### 3 · Music", elem_classes="step-title")
|
| 255 |
+
audio_output = gr.Audio(
|
| 256 |
+
label="Your song",
|
| 257 |
+
type="filepath",
|
| 258 |
+
interactive=False,
|
| 259 |
+
show_download_button=True,
|
| 260 |
+
)
|
| 261 |
+
score_output = gr.Textbox(
|
| 262 |
+
label="Score (ABC notation)",
|
| 263 |
+
lines=10,
|
| 264 |
+
max_lines=20,
|
| 265 |
+
interactive=False,
|
| 266 |
+
show_copy_button=True,
|
| 267 |
+
elem_id="score",
|
| 268 |
+
)
|
| 269 |
+
music_button = gr.Button("New music · keep lyrics", interactive=False)
|
| 270 |
+
gr.Markdown(
|
| 271 |
+
"Composes a new score for the same lyrics, using the style and Advanced settings in column 1.",
|
| 272 |
+
elem_classes="hint",
|
| 273 |
+
)
|
| 274 |
+
|
| 275 |
gr.Markdown(
|
| 276 |
"Lyrics: DeepSeek V4.1 Flash via Hugging Face Inference Providers, billed to your account. "
|
| 277 |
+
"Music: YuE2-3B on ZeroGPU. Model weights are CC BY-NC 4.0.",
|
| 278 |
+
elem_classes="hint",
|
| 279 |
)
|
| 280 |
|
| 281 |
+
result_components = [
|
| 282 |
+
status, lyrics_output, audio_output, score_output, seed_input,
|
| 283 |
+
create_button, rewrite_button, music_button, current_song,
|
| 284 |
+
]
|
| 285 |
+
settings_inputs = [style_input, custom_style_input, planning_input, quality_input, seed_input, randomize_input]
|
| 286 |
+
|
| 287 |
demo.load(lambda saved: saved, token_state, token_input)
|
| 288 |
verify_button.click(verify_token, token_input, [settings_status, token_state])
|
| 289 |
remove_button.click(remove_token, None, [token_input, token_state, settings_status])
|
| 290 |
create_button.click(
|
| 291 |
+
new_song,
|
| 292 |
+
[topic_input, *settings_inputs, token_input, current_song],
|
| 293 |
+
result_components,
|
|
|
|
| 294 |
)
|
| 295 |
+
rewrite_button.click(rewrite_lyrics, [direction_input, token_input, current_song], result_components)
|
| 296 |
+
music_button.click(new_music, [*settings_inputs, current_song], result_components)
|
| 297 |
|
| 298 |
demo.queue(default_concurrency_limit=1).launch()
|