Update app.py
Browse files
app.py
CHANGED
@@ -240,7 +240,7 @@ def generate_music(
|
|
240 |
use_cache=True,
|
241 |
top_k=50,
|
242 |
num_beams=1,
|
243 |
-
|
244 |
)
|
245 |
if output_seq[0][-1].item() != mmtokenizer.eoa:
|
246 |
tensor_eoa = torch.as_tensor([[mmtokenizer.eoa]]).to(model.device)
|
@@ -427,26 +427,26 @@ with gr.Blocks() as demo:
|
|
427 |
submit_btn = gr.Button("Submit")
|
428 |
music_out = gr.Audio(label="Audio Result")
|
429 |
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
Woke up in the morning, sun is shining bright
|
435 |
-
Chasing all my dreams, gotta get my mind right
|
436 |
-
City lights are fading, but my vision's clear
|
437 |
-
Got my team beside me, no room for fear
|
438 |
-
Walking through the streets, beats inside my head
|
439 |
-
Every step I take, closer to the bread
|
440 |
-
People passing by, they don't understand
|
441 |
-
Building up my future with my own two hands
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
|
451 |
gr.Examples(
|
452 |
examples=[
|
@@ -488,7 +488,7 @@ Living out my dreams with this mic and a deal
|
|
488 |
inputs=[genre_txt, lyrics_txt],
|
489 |
outputs=[music_out],
|
490 |
cache_examples=True,
|
491 |
-
cache_mode="
|
492 |
fn=infer
|
493 |
)
|
494 |
|
|
|
240 |
use_cache=True,
|
241 |
top_k=50,
|
242 |
num_beams=1,
|
243 |
+
assistant_model=assistant_model
|
244 |
)
|
245 |
if output_seq[0][-1].item() != mmtokenizer.eoa:
|
246 |
tensor_eoa = torch.as_tensor([[mmtokenizer.eoa]]).to(model.device)
|
|
|
427 |
submit_btn = gr.Button("Submit")
|
428 |
music_out = gr.Audio(label="Audio Result")
|
429 |
|
430 |
+
# gr.Examples(
|
431 |
+
# examples=[
|
432 |
+
# ["Rap, Hip-Hop, Street Vibes, Tough, Piercing Vocals, Piano, Synthesizer, Clear Male Vocals",
|
433 |
+
# """[verse]
|
434 |
+
# Woke up in the morning, sun is shining bright
|
435 |
+
# Chasing all my dreams, gotta get my mind right
|
436 |
+
# City lights are fading, but my vision's clear
|
437 |
+
# Got my team beside me, no room for fear
|
438 |
+
# Walking through the streets, beats inside my head
|
439 |
+
# Every step I take, closer to the bread
|
440 |
+
# People passing by, they don't understand
|
441 |
+
# Building up my future with my own two hands
|
442 |
+
# """],
|
443 |
+
# ],
|
444 |
+
# inputs=[genre_txt, lyrics_txt],
|
445 |
+
# outputs=[music_out],
|
446 |
+
# cache_examples=True,
|
447 |
+
# cache_mode="eager",
|
448 |
+
# fn=infer
|
449 |
+
# )
|
450 |
|
451 |
gr.Examples(
|
452 |
examples=[
|
|
|
488 |
inputs=[genre_txt, lyrics_txt],
|
489 |
outputs=[music_out],
|
490 |
cache_examples=True,
|
491 |
+
cache_mode="eager",
|
492 |
fn=infer
|
493 |
)
|
494 |
|