Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,9 +4,9 @@ import requests
|
|
| 4 |
import json
|
| 5 |
|
| 6 |
# Retrieve the API token from secrets
|
| 7 |
-
api_token = os.getenv("
|
| 8 |
if not api_token:
|
| 9 |
-
raise ValueError("API token not found. Make sure '
|
| 10 |
|
| 11 |
# Use the token in your request headers
|
| 12 |
HEADERS = {"Authorization": f"Bearer {api_token}"}
|
|
|
|
| 4 |
import json
|
| 5 |
|
| 6 |
# Retrieve the API token from secrets
|
| 7 |
+
api_token = os.getenv("API_TOKEN")
|
| 8 |
if not api_token:
|
| 9 |
+
raise ValueError("API token not found. Make sure 'API_TOKEN' is set in the Secrets.")
|
| 10 |
|
| 11 |
# Use the token in your request headers
|
| 12 |
HEADERS = {"Authorization": f"Bearer {api_token}"}
|