stardate69 commited on
Commit
d4c09e5
·
verified ·
1 Parent(s): 95cfba5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -3,6 +3,7 @@ import os
3
  import soundfile as sf
4
  from diffusers import StableAudioPipeline
5
  from huggingface_hub import login
 
6
 
7
  # Retrieve the token securely from environment variables
8
  HUGGINGFACE_TOKEN = os.getenv("HF_TOKEN")
@@ -19,8 +20,7 @@ torch_dtype = torch.float16 if device == "cuda" else torch.float32
19
  # Load the pipeline
20
  pipe = StableAudioPipeline.from_pretrained(
21
  "stabilityai/stable-audio-open-1.0",
22
- torch_dtype=torch_dtype,
23
- use_auth_token=HUGGINGFACE_TOKEN # Explicitly use token
24
  )
25
  pipe = pipe.to(device)
26
 
 
3
  import soundfile as sf
4
  from diffusers import StableAudioPipeline
5
  from huggingface_hub import login
6
+ import gradio as gr
7
 
8
  # Retrieve the token securely from environment variables
9
  HUGGINGFACE_TOKEN = os.getenv("HF_TOKEN")
 
20
  # Load the pipeline
21
  pipe = StableAudioPipeline.from_pretrained(
22
  "stabilityai/stable-audio-open-1.0",
23
+ torch_dtype=torch_dtype
 
24
  )
25
  pipe = pipe.to(device)
26