Spaces:
Running
on
Zero
Running
on
Zero
artificialguybr
commited on
Commit
•
9b4a54c
1
Parent(s):
514dec9
Update app.py
Browse files
app.py
CHANGED
@@ -17,11 +17,9 @@ def generate_audio(prompt, seconds_total=30, steps=100, cfg_scale=7):
|
|
17 |
|
18 |
# Fetch the Hugging Face token from the environment variable
|
19 |
hf_token = os.getenv('HF_TOKEN')
|
20 |
-
if not hf_token:
|
21 |
-
raise EnvironmentError("HF_TOKEN environment variable not set")
|
22 |
|
23 |
# Download and set up the model
|
24 |
-
model, model_config = get_pretrained_model("stabilityai/stable-audio-open-1.0"
|
25 |
sample_rate = model_config["sample_rate"]
|
26 |
sample_size = model_config["sample_size"]
|
27 |
|
|
|
17 |
|
18 |
# Fetch the Hugging Face token from the environment variable
|
19 |
hf_token = os.getenv('HF_TOKEN')
|
|
|
|
|
20 |
|
21 |
# Download and set up the model
|
22 |
+
model, model_config = get_pretrained_model("stabilityai/stable-audio-open-1.0")
|
23 |
sample_rate = model_config["sample_rate"]
|
24 |
sample_size = model_config["sample_size"]
|
25 |
|