yasserrmd commited on
Commit
28993ef
1 Parent(s): ff118e3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -7,13 +7,12 @@ import spaces
7
 
8
  # Load the StableAudio pipeline model
9
  pipe = StableAudioPipeline.from_pretrained("stabilityai/stable-audio-open-1.0", torch_dtype=torch.float16)
10
-
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
- pipe = pipe.to("cuda")
16
-
17
  # Set the seed for reproducibility
18
  generator = torch.Generator("cuda").manual_seed(seed)
19
 
 
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
17
  generator = torch.Generator("cuda").manual_seed(seed)
18