Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -35,6 +35,8 @@ import gradio as gr
|
|
35 |
from stable_audio_tools import get_pretrained_model
|
36 |
from stable_audio_tools.inference.generation import generate_diffusion_cond
|
37 |
|
|
|
|
|
38 |
# Load the model outside of the GPU-decorated function
|
39 |
def load_model():
|
40 |
print("Loading model...")
|
|
|
35 |
from stable_audio_tools import get_pretrained_model
|
36 |
from stable_audio_tools.inference.generation import generate_diffusion_cond
|
37 |
|
38 |
+
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
39 |
+
|
40 |
# Load the model outside of the GPU-decorated function
|
41 |
def load_model():
|
42 |
print("Loading model...")
|