Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -5,11 +5,13 @@ import requests
|
|
5 |
# ์ด๋ฏธ์ง ์ธ์ ํ์ดํ๋ผ์ธ ๋ก๋
|
6 |
image_model = pipeline("image-classification", model="google/vit-base-patch16-224")
|
7 |
|
|
|
|
|
8 |
def get_audiogen(prompt):
|
9 |
# ์ค๋์ค ์์ฑ ๋ชจ๋ธ API ํธ์ถ
|
10 |
response = requests.post(
|
11 |
"https://api-inference.huggingface.co/models/fffiloni/audiogen",
|
12 |
-
headers={"Authorization": "
|
13 |
json={"inputs": prompt, "parameters": {"length": 10}, "options": {"use_cache": False}}
|
14 |
)
|
15 |
result = response.json()
|
|
|
5 |
# ์ด๋ฏธ์ง ์ธ์ ํ์ดํ๋ผ์ธ ๋ก๋
|
6 |
image_model = pipeline("image-classification", model="google/vit-base-patch16-224")
|
7 |
|
8 |
+
hugging_face_auth_token = os.getenv("HUGGING_FACE_AUTH_TOKEN")
|
9 |
+
|
10 |
def get_audiogen(prompt):
|
11 |
# ์ค๋์ค ์์ฑ ๋ชจ๋ธ API ํธ์ถ
|
12 |
response = requests.post(
|
13 |
"https://api-inference.huggingface.co/models/fffiloni/audiogen",
|
14 |
+
headers={"Authorization": "Bearer os.getenv"},
|
15 |
json={"inputs": prompt, "parameters": {"length": 10}, "options": {"use_cache": False}}
|
16 |
)
|
17 |
result = response.json()
|