Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,6 +5,12 @@ from einops import rearrange
|
|
| 5 |
from stable_audio_tools import get_pretrained_model
|
| 6 |
from stable_audio_tools.inference.generation import generate_diffusion_cond
|
| 7 |
import gradio as gr
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
|
| 9 |
@spaces.GPU(duration=180)
|
| 10 |
def generate_audio(prompt, duration=10, steps=50, cfg_scale=7):
|
|
|
|
| 5 |
from stable_audio_tools import get_pretrained_model
|
| 6 |
from stable_audio_tools.inference.generation import generate_diffusion_cond
|
| 7 |
import gradio as gr
|
| 8 |
+
import os
|
| 9 |
+
from huggingface_hub import login
|
| 10 |
+
|
| 11 |
+
# Authentifizierung
|
| 12 |
+
if os.environ.get("HUGGING_FACE_HUB_TOKEN"):
|
| 13 |
+
login(token=os.environ["HUGGING_FACE_HUB_TOKEN"])
|
| 14 |
|
| 15 |
@spaces.GPU(duration=180)
|
| 16 |
def generate_audio(prompt, duration=10, steps=50, cfg_scale=7):
|