Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -7,6 +7,7 @@ import json
|
|
7 |
import gradio as gr
|
8 |
from omegaconf import OmegaConf
|
9 |
from huggingface_hub import hf_hub_download
|
|
|
10 |
|
11 |
# Add the SongBloom module to the path
|
12 |
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
@@ -76,6 +77,7 @@ class SongBloomApp:
|
|
76 |
self.is_loading = False
|
77 |
return f"Error loading model: {str(e)}"
|
78 |
|
|
|
79 |
def generate_song(self, lyrics, prompt_audio, n_samples=1, dtype="float32", progress=gr.Progress()):
|
80 |
"""Generate song from lyrics and audio prompt"""
|
81 |
if self.model is None:
|
|
|
7 |
import gradio as gr
|
8 |
from omegaconf import OmegaConf
|
9 |
from huggingface_hub import hf_hub_download
|
10 |
+
import spaces
|
11 |
|
12 |
# Add the SongBloom module to the path
|
13 |
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
|
|
77 |
self.is_loading = False
|
78 |
return f"Error loading model: {str(e)}"
|
79 |
|
80 |
+
@spaces.GPU
|
81 |
def generate_song(self, lyrics, prompt_audio, n_samples=1, dtype="float32", progress=gr.Progress()):
|
82 |
"""Generate song from lyrics and audio prompt"""
|
83 |
if self.model is None:
|