Update app.py
Browse files
app.py
CHANGED
@@ -15,12 +15,12 @@ GCP_LOCATION = os.environ.get("GCP_LOCATION")
|
|
15 |
# --- Authentication and Sanity Checks Block ---
|
16 |
|
17 |
# Part A: Hugging Face Hub Authentication
|
18 |
-
hf_token = os.environ.get("
|
19 |
if hf_token:
|
20 |
print("Hugging Face token found. Logging in.")
|
21 |
login(token=hf_token)
|
22 |
else:
|
23 |
-
print("WARNING: Hugging Face token ('
|
24 |
|
25 |
# Part B: Google Cloud Credentials and Initialization
|
26 |
creds_json_str = os.environ.get("GOOGLE_APPLICATION_CREDENTIALS_JSON")
|
|
|
15 |
# --- Authentication and Sanity Checks Block ---
|
16 |
|
17 |
# Part A: Hugging Face Hub Authentication
|
18 |
+
hf_token = os.environ.get("IMAGEN_TOKEN")
|
19 |
if hf_token:
|
20 |
print("Hugging Face token found. Logging in.")
|
21 |
login(token=hf_token)
|
22 |
else:
|
23 |
+
print("WARNING: Hugging Face token ('IMAGEN_TOKEN') not found. Hub-related features may be disabled.")
|
24 |
|
25 |
# Part B: Google Cloud Credentials and Initialization
|
26 |
creds_json_str = os.environ.get("GOOGLE_APPLICATION_CREDENTIALS_JSON")
|