thecollabagepatch commited on
Commit
72a3d04
1 Parent(s): 3c1e68c

90s gpu requests

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -121,7 +121,7 @@ def generate_midi(seed, use_chords, chord_progression, bpm):
121
  sample_rate = 44100 # Assuming fixed sample rate from fluidsynth command
122
  return wav_filename
123
 
124
- @spaces.GPU(duration=60)
125
  def generate_music(wav_filename, prompt_duration, musicgen_model, num_iterations, bpm):
126
  # Load the audio from the passed file path
127
  song, sr = torchaudio.load(wav_filename)
@@ -183,7 +183,7 @@ def generate_music(wav_filename, prompt_duration, musicgen_model, num_iterations
183
 
184
  return combined_audio_filename
185
 
186
- @spaces.GPU(duration=60)
187
  def continue_music(input_audio_path, prompt_duration, musicgen_model, num_iterations, bpm):
188
  # Load the audio from the given file path
189
  song, sr = torchaudio.load(input_audio_path)
@@ -295,7 +295,7 @@ with gr.Blocks() as iface:
295
  "thepatch/bleeps-medium (medium)",
296
  "thepatch/hoenn_lofi (large)"
297
  ], value="thepatch/vanya_ai_dnb_0.1 (small)")
298
- num_iterations = gr.Slider(label="Number of Iterations", minimum=1, maximum=3, step=1, value=3)
299
  generate_music_button = gr.Button("Generate Music")
300
  output_audio = gr.Audio(label="Generated Music", type="filepath")
301
  continue_button = gr.Button("Continue Generating Music")
 
121
  sample_rate = 44100 # Assuming fixed sample rate from fluidsynth command
122
  return wav_filename
123
 
124
+ @spaces.GPU(duration=90)
125
  def generate_music(wav_filename, prompt_duration, musicgen_model, num_iterations, bpm):
126
  # Load the audio from the passed file path
127
  song, sr = torchaudio.load(wav_filename)
 
183
 
184
  return combined_audio_filename
185
 
186
+ @spaces.GPU(duration=90)
187
  def continue_music(input_audio_path, prompt_duration, musicgen_model, num_iterations, bpm):
188
  # Load the audio from the given file path
189
  song, sr = torchaudio.load(input_audio_path)
 
295
  "thepatch/bleeps-medium (medium)",
296
  "thepatch/hoenn_lofi (large)"
297
  ], value="thepatch/vanya_ai_dnb_0.1 (small)")
298
+ num_iterations = gr.Slider(label="Number of Iterations", minimum=1, maximum=1, step=1, value=3)
299
  generate_music_button = gr.Button("Generate Music")
300
  output_audio = gr.Audio(label="Generated Music", type="filepath")
301
  continue_button = gr.Button("Continue Generating Music")