Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,7 +5,12 @@ import requests
|
|
| 5 |
# CONFIG
|
| 6 |
# -----------------------------
|
| 7 |
SUNO_API_BASE = "https://api.sunoapi.org"
|
| 8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
|
| 10 |
HEADERS = {
|
| 11 |
"Authorization": f"Bearer {API_KEY}",
|
|
|
|
| 5 |
# CONFIG
|
| 6 |
# -----------------------------
|
| 7 |
SUNO_API_BASE = "https://api.sunoapi.org"
|
| 8 |
+
import os
|
| 9 |
+
|
| 10 |
+
API_KEY = os.getenv("SunoKey")
|
| 11 |
+
|
| 12 |
+
if not API_KEY:
|
| 13 |
+
raise RuntimeError("Missing SunoKey environment variable")
|
| 14 |
|
| 15 |
HEADERS = {
|
| 16 |
"Authorization": f"Bearer {API_KEY}",
|