Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,10 +1,12 @@
|
|
1 |
import gradio as gr
|
|
|
2 |
import spaces
|
3 |
import json
|
4 |
import re
|
5 |
import random
|
6 |
import numpy as np
|
7 |
from gradio_client import Client
|
|
|
8 |
|
9 |
MAX_SEED = np.iinfo(np.int32).max
|
10 |
|
@@ -188,7 +190,7 @@ def get_musicgen(prompt):
|
|
188 |
return result[1]
|
189 |
|
190 |
def get_stable_audio_open(prompt):
|
191 |
-
client = Client("
|
192 |
result = client.predict(
|
193 |
prompt=prompt,
|
194 |
seconds_total=30,
|
|
|
1 |
import gradio as gr
|
2 |
+
import os
|
3 |
import spaces
|
4 |
import json
|
5 |
import re
|
6 |
import random
|
7 |
import numpy as np
|
8 |
from gradio_client import Client
|
9 |
+
hf_token = os.environ.get("HF_TOKEN")
|
10 |
|
11 |
MAX_SEED = np.iinfo(np.int32).max
|
12 |
|
|
|
190 |
return result[1]
|
191 |
|
192 |
def get_stable_audio_open(prompt):
|
193 |
+
client = Client("fffiloni/Stable-Audio-Open-A10", token=hf_token)
|
194 |
result = client.predict(
|
195 |
prompt=prompt,
|
196 |
seconds_total=30,
|