Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
cf7f846
1
Parent(s):
8bdf8d9
extract filename from tuple
Browse files
app.py
CHANGED
|
@@ -119,7 +119,9 @@ def generate_midi(seed, use_chords, chord_progression, bpm):
|
|
| 119 |
return wav_filename
|
| 120 |
|
| 121 |
@spaces.GPU(duration=120)
|
| 122 |
-
def generate_music(
|
|
|
|
|
|
|
| 123 |
# Load the generated audio
|
| 124 |
song, sr = torchaudio.load(wav_filename)
|
| 125 |
song = song.to(device)
|
|
|
|
| 119 |
return wav_filename
|
| 120 |
|
| 121 |
@spaces.GPU(duration=120)
|
| 122 |
+
def generate_music(midi_audio, prompt_duration, musicgen_model, num_iterations, bpm):
|
| 123 |
+
wav_filename = midi_audio[0] # Extract the file path from the tuple
|
| 124 |
+
|
| 125 |
# Load the generated audio
|
| 126 |
song, sr = torchaudio.load(wav_filename)
|
| 127 |
song = song.to(device)
|