Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,7 +7,14 @@ import requests
|
|
| 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")
|
|
|
|
| 7 |
SUNO_API_BASE = "https://api.sunoapi.org"
|
| 8 |
import os
|
| 9 |
|
| 10 |
+
#API_KEY = os.getenv("SunoKey")
|
| 11 |
+
from dotenv import load_dotenv
|
| 12 |
+
|
| 13 |
+
# Load environment variables from the .env file
|
| 14 |
+
load_dotenv()
|
| 15 |
+
|
| 16 |
+
# Access the environment variables
|
| 17 |
+
suno_api_key = os.getenv('SUNO_API_KEY')
|
| 18 |
|
| 19 |
if not API_KEY:
|
| 20 |
raise RuntimeError("Missing SunoKey environment variable")
|