Spaces:
Sleeping
Sleeping
fix bugs
Browse files
app.py
CHANGED
@@ -6,11 +6,11 @@ import gradio as gr
|
|
6 |
from datetime import datetime
|
7 |
|
8 |
# Retrieve the Hugging Face token from environment variables
|
9 |
-
api_token = os.getenv("
|
10 |
|
11 |
# Debugging: Check if the Hugging Face token is available
|
12 |
if not api_token:
|
13 |
-
print("ERROR: Hugging Face token (
|
14 |
else:
|
15 |
print("Hugging Face token loaded successfully.")
|
16 |
|
@@ -73,7 +73,7 @@ print("Model Options:", [m["alias"] for m in models])
|
|
73 |
def generate_image(prompt_alias, team, model_alias, height, width, num_inference_steps, guidance_scale, seed):
|
74 |
# Debugging: Check if the token is available
|
75 |
if not api_token:
|
76 |
-
return None, "ERROR: Hugging Face token (
|
77 |
|
78 |
# Find the selected prompt and model
|
79 |
try:
|
|
|
6 |
from datetime import datetime
|
7 |
|
8 |
# Retrieve the Hugging Face token from environment variables
|
9 |
+
api_token = os.getenv("HF_CTB_TOKEN")
|
10 |
|
11 |
# Debugging: Check if the Hugging Face token is available
|
12 |
if not api_token:
|
13 |
+
print("ERROR: Hugging Face token (HF_CTB_TOKEN) is missing. Please set it as an environment variable.")
|
14 |
else:
|
15 |
print("Hugging Face token loaded successfully.")
|
16 |
|
|
|
73 |
def generate_image(prompt_alias, team, model_alias, height, width, num_inference_steps, guidance_scale, seed):
|
74 |
# Debugging: Check if the token is available
|
75 |
if not api_token:
|
76 |
+
return None, "ERROR: Hugging Face token (HF_CTB_TOKEN) is missing. Please set it as an environment variable."
|
77 |
|
78 |
# Find the selected prompt and model
|
79 |
try:
|