Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,7 +4,9 @@ import os
|
|
| 4 |
|
| 5 |
# Configure the endpoint and authentication
|
| 6 |
ENDPOINT_URL = os.environ.get("ENDPOINT_URL", "https://z3xyxntalfy45pxc.us-east-1.aws.endpoints.huggingface.cloud")
|
| 7 |
-
HF_API_TOKEN = os.environ.get("HF_API_TOKEN") # Get API token from environment variable
|
|
|
|
|
|
|
| 8 |
|
| 9 |
# Check if the API token is configured
|
| 10 |
def is_token_configured():
|
|
|
|
| 4 |
|
| 5 |
# Configure the endpoint and authentication
|
| 6 |
ENDPOINT_URL = os.environ.get("ENDPOINT_URL", "https://z3xyxntalfy45pxc.us-east-1.aws.endpoints.huggingface.cloud")
|
| 7 |
+
# HF_API_TOKEN = os.environ.get("HF_API_TOKEN") # Get API token from environment variable
|
| 8 |
+
HF_API_TOKEN = os.environ.get("HF_API_TOKEN", "").strip() # Use strip() to remove extra whitespaces and newlines
|
| 9 |
+
|
| 10 |
|
| 11 |
# Check if the API token is configured
|
| 12 |
def is_token_configured():
|