Spaces:
Running
Running
futurespyhi
commited on
Commit
·
6bcf3a4
1
Parent(s):
bc268c7
modify input genre file
Browse files
app.py
CHANGED
|
@@ -191,7 +191,7 @@ def generate_music_spaces(lyrics: str, genre: str, mood: str, progress=gr.Progre
|
|
| 191 |
# Create temporary files
|
| 192 |
with tempfile.NamedTemporaryFile(mode='w', suffix='.txt', delete=False) as genre_file:
|
| 193 |
# genre_file.write(f"instrumental,{genre},{mood},male vocals")
|
| 194 |
-
genre_file.write(f"instrumental
|
| 195 |
genre_file_path = genre_file.name
|
| 196 |
|
| 197 |
# Convert lyrics format for YuE compatibility
|
|
@@ -254,8 +254,7 @@ def generate_music_spaces(lyrics: str, genre: str, mood: str, progress=gr.Progre
|
|
| 254 |
"--output_dir", output_dir,
|
| 255 |
"--max_new_tokens", "3000", # Full token count
|
| 256 |
"--prompt_start_time", "0",
|
| 257 |
-
"--prompt_end_time", "30"
|
| 258 |
-
"--repetition_penalty", "1.0"
|
| 259 |
]
|
| 260 |
|
| 261 |
# Use flash attention if available, otherwise fallback
|
|
|
|
| 191 |
# Create temporary files
|
| 192 |
with tempfile.NamedTemporaryFile(mode='w', suffix='.txt', delete=False) as genre_file:
|
| 193 |
# genre_file.write(f"instrumental,{genre},{mood},male vocals")
|
| 194 |
+
genre_file.write(f"instrumental {genre} {mood} female vocals airy vocal")
|
| 195 |
genre_file_path = genre_file.name
|
| 196 |
|
| 197 |
# Convert lyrics format for YuE compatibility
|
|
|
|
| 254 |
"--output_dir", output_dir,
|
| 255 |
"--max_new_tokens", "3000", # Full token count
|
| 256 |
"--prompt_start_time", "0",
|
| 257 |
+
"--prompt_end_time", "30" # Full 30-second clips
|
|
|
|
| 258 |
]
|
| 259 |
|
| 260 |
# Use flash attention if available, otherwise fallback
|