Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -6,9 +6,9 @@ import gradio as gr
|
|
6 |
from datetime import datetime
|
7 |
|
8 |
# Debugging: Check if the Hugging Face token is available
|
9 |
-
api_token = os.getenv("
|
10 |
if not api_token:
|
11 |
-
print("ERROR: Hugging Face token (
|
12 |
else:
|
13 |
print("Hugging Face token loaded successfully.")
|
14 |
|
@@ -67,7 +67,7 @@ prompts = [
|
|
67 |
def generate_image(prompt_alias, team, model_alias, height, width, num_inference_steps, guidance_scale, seed):
|
68 |
# Debugging: Check if the token is available
|
69 |
if not api_token:
|
70 |
-
return None, "ERROR: Hugging Face token (
|
71 |
|
72 |
# Find the selected prompt and model
|
73 |
prompt = next(p for p in prompts if p["alias"] == prompt_alias)["text"]
|
|
|
6 |
from datetime import datetime
|
7 |
|
8 |
# Debugging: Check if the Hugging Face token is available
|
9 |
+
api_token = os.getenv("HF_CTB_TOKEN")
|
10 |
if not api_token:
|
11 |
+
print("ERROR: Hugging Face token (HF_CTB_TOKEN) is missing. Please set it as an environment variable.")
|
12 |
else:
|
13 |
print("Hugging Face token loaded successfully.")
|
14 |
|
|
|
67 |
def generate_image(prompt_alias, team, model_alias, height, width, num_inference_steps, guidance_scale, seed):
|
68 |
# Debugging: Check if the token is available
|
69 |
if not api_token:
|
70 |
+
return None, "ERROR: Hugging Face token (HF_CTB_TOKEN) is missing. Please set it as an environment variable."
|
71 |
|
72 |
# Find the selected prompt and model
|
73 |
prompt = next(p for p in prompts if p["alias"] == prompt_alias)["text"]
|