Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -114,7 +114,7 @@ def load_audio_mono(filepath, sampling_rate=16000):
|
|
| 114 |
def generate_music(
|
| 115 |
genre_txt=None,
|
| 116 |
lyrics_txt=None,
|
| 117 |
-
max_new_tokens=
|
| 118 |
run_n_segments=2,
|
| 119 |
use_audio_prompt=False,
|
| 120 |
audio_prompt_path="",
|
|
@@ -320,13 +320,13 @@ Living out my dreams with this mic and a deal
|
|
| 320 |
],
|
| 321 |
inputs = [genre_txt, lyrics_txt],
|
| 322 |
outputs = [music_out],
|
| 323 |
-
cache_examples =
|
| 324 |
-
|
| 325 |
-
fn=
|
| 326 |
)
|
| 327 |
|
| 328 |
submit_btn.click(
|
| 329 |
-
fn =
|
| 330 |
inputs = [genre_txt, lyrics_txt, num_segments, max_new_tokens],
|
| 331 |
outputs = [music_out]
|
| 332 |
)
|
|
|
|
| 114 |
def generate_music(
|
| 115 |
genre_txt=None,
|
| 116 |
lyrics_txt=None,
|
| 117 |
+
max_new_tokens=100,
|
| 118 |
run_n_segments=2,
|
| 119 |
use_audio_prompt=False,
|
| 120 |
audio_prompt_path="",
|
|
|
|
| 320 |
],
|
| 321 |
inputs = [genre_txt, lyrics_txt],
|
| 322 |
outputs = [music_out],
|
| 323 |
+
cache_examples = True,
|
| 324 |
+
cache_mode="eager",
|
| 325 |
+
fn=generate_music
|
| 326 |
)
|
| 327 |
|
| 328 |
submit_btn.click(
|
| 329 |
+
fn = generate_music,
|
| 330 |
inputs = [genre_txt, lyrics_txt, num_segments, max_new_tokens],
|
| 331 |
outputs = [music_out]
|
| 332 |
)
|