Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -104,7 +104,7 @@ except Exception as e:
|
|
| 104 |
LYRICS_PATTERN = re.compile(r"\[(\w+)\](.*?)\n(?=\[|\Z)", re.DOTALL)
|
| 105 |
|
| 106 |
# ------------------ GPU decorated generation function ------------------ #
|
| 107 |
-
@spaces.GPU(duration=
|
| 108 |
def generate_music(
|
| 109 |
max_new_tokens=5,
|
| 110 |
run_n_segments=2,
|
|
@@ -326,7 +326,7 @@ def generate_music(
|
|
| 326 |
return None, None, None
|
| 327 |
|
| 328 |
# ------------------ Inference function and Gradio UI ------------------ #
|
| 329 |
-
def infer(genre_txt_content, lyrics_txt_content, num_segments=
|
| 330 |
try:
|
| 331 |
mixed_audio_data, vocal_audio_data, instrumental_audio_data = generate_music(
|
| 332 |
genre_txt=genre_txt_content,
|
|
|
|
| 104 |
LYRICS_PATTERN = re.compile(r"\[(\w+)\](.*?)\n(?=\[|\Z)", re.DOTALL)
|
| 105 |
|
| 106 |
# ------------------ GPU decorated generation function ------------------ #
|
| 107 |
+
@spaces.GPU(duration=175)
|
| 108 |
def generate_music(
|
| 109 |
max_new_tokens=5,
|
| 110 |
run_n_segments=2,
|
|
|
|
| 326 |
return None, None, None
|
| 327 |
|
| 328 |
# ------------------ Inference function and Gradio UI ------------------ #
|
| 329 |
+
def infer(genre_txt_content, lyrics_txt_content, num_segments=2, max_new_tokens=25):
|
| 330 |
try:
|
| 331 |
mixed_audio_data, vocal_audio_data, instrumental_audio_data = generate_music(
|
| 332 |
genre_txt=genre_txt_content,
|