thecollabagepatch commited on
Commit
cf7f846
1 Parent(s): 8bdf8d9

extract filename from tuple

Browse files
Files changed (1) hide show
  1. app.py +3 -1
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(wav_filename, prompt_duration, musicgen_model, num_iterations, bpm):
 
 
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)