Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,12 +1,10 @@
|
|
1 |
import gradio as gr
|
2 |
-
import spaces
|
3 |
import torchaudio
|
4 |
from audiocraft.models import AudioGen
|
5 |
from audiocraft.data.audio import audio_write
|
6 |
|
7 |
model = AudioGen.get_pretrained('facebook/audiogen-medium')
|
8 |
|
9 |
-
@spaces.GPU(enable_queue=True)
|
10 |
def infer(prompt):
|
11 |
|
12 |
model.set_generation_params(duration=5) # generate 5 seconds.
|
|
|
1 |
import gradio as gr
|
|
|
2 |
import torchaudio
|
3 |
from audiocraft.models import AudioGen
|
4 |
from audiocraft.data.audio import audio_write
|
5 |
|
6 |
model = AudioGen.get_pretrained('facebook/audiogen-medium')
|
7 |
|
|
|
8 |
def infer(prompt):
|
9 |
|
10 |
model.set_generation_params(duration=5) # generate 5 seconds.
|