yasserrmd commited on
Commit
fa5e748
·
verified ·
1 Parent(s): 4e23b45

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -2,15 +2,15 @@ import torch
2
  import soundfile as sf
3
  from diffusers import StableAudioPipeline
4
  import gradio as gr
5
- import spaces
6
 
7
 
8
  # Load the StableAudio pipeline model
9
  pipe = StableAudioPipeline.from_pretrained("stabilityai/stable-audio-open-1.0", torch_dtype=torch.float16)
10
- pipe = pipe.to("cuda")
11
 
12
  # Define the function to generate the sound based on a text prompt
13
- @spaces.GPU
14
  def generate_sound(prompt, negative_prompt, seed, inference_steps, duration, waveforms):
15
 
16
  # Set the seed for reproducibility
 
2
  import soundfile as sf
3
  from diffusers import StableAudioPipeline
4
  import gradio as gr
5
+ #import spaces
6
 
7
 
8
  # Load the StableAudio pipeline model
9
  pipe = StableAudioPipeline.from_pretrained("stabilityai/stable-audio-open-1.0", torch_dtype=torch.float16)
10
+ #pipe = pipe.to("cuda")
11
 
12
  # Define the function to generate the sound based on a text prompt
13
+ #@spaces.GPU
14
  def generate_sound(prompt, negative_prompt, seed, inference_steps, duration, waveforms):
15
 
16
  # Set the seed for reproducibility