Spaces:
Running
on
Zero
Running
on
Zero
thecollabagepatch
commited on
Commit
•
40a916f
1
Parent(s):
58fc3d4
continuing continuation attempt 1
Browse files
app.py
CHANGED
@@ -120,7 +120,7 @@ def generate_midi(seed, use_chords, chord_progression, bpm):
|
|
120 |
sample_rate = 44100 # Assuming fixed sample rate from fluidsynth command
|
121 |
return wav_filename
|
122 |
|
123 |
-
@spaces.GPU(duration=
|
124 |
def generate_music(wav_filename, prompt_duration, musicgen_model, num_iterations, bpm):
|
125 |
# Load the audio from the passed file path
|
126 |
song, sr = torchaudio.load(wav_filename)
|
@@ -182,7 +182,8 @@ def generate_music(wav_filename, prompt_duration, musicgen_model, num_iterations
|
|
182 |
|
183 |
return combined_audio_filename
|
184 |
|
185 |
-
|
|
|
186 |
# Load the audio from the given file path
|
187 |
song, sr = torchaudio.load(input_audio_path)
|
188 |
song = song.to(device)
|
|
|
120 |
sample_rate = 44100 # Assuming fixed sample rate from fluidsynth command
|
121 |
return wav_filename
|
122 |
|
123 |
+
@spaces.GPU(duration=60)
|
124 |
def generate_music(wav_filename, prompt_duration, musicgen_model, num_iterations, bpm):
|
125 |
# Load the audio from the passed file path
|
126 |
song, sr = torchaudio.load(wav_filename)
|
|
|
182 |
|
183 |
return combined_audio_filename
|
184 |
|
185 |
+
@spaces.GPU(duration=60)
|
186 |
+
def continue_music(input_audio_path, prompt_duration, musicgen_model, num_iterations, bpm):
|
187 |
# Load the audio from the given file path
|
188 |
song, sr = torchaudio.load(input_audio_path)
|
189 |
song = song.to(device)
|