andresampa commited on
Commit
40c2c05
·
verified ·
1 Parent(s): 6886623

fix token bug

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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("HF_TOKEN")
10
 
11
  # Debugging: Check if the Hugging Face token is available
12
  if not api_token:
13
- print("ERROR: Hugging Face token (HF_TOKEN) is missing. Please set it as an environment variable.")
14
  else:
15
  print("Hugging Face token loaded successfully.")
16
 
@@ -69,7 +69,7 @@ prompts = [
69
  def generate_image(prompt_alias, team, model_alias, height, width, num_inference_steps, guidance_scale, seed):
70
  # Debugging: Check if the token is available
71
  if not api_token:
72
- return None, "ERROR: Hugging Face token (HF_TOKEN) is missing. Please set it as an environment variable."
73
 
74
  # Find the selected prompt and model
75
  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
 
 
69
  def generate_image(prompt_alias, team, model_alias, height, width, num_inference_steps, guidance_scale, seed):
70
  # Debugging: Check if the token is available
71
  if not api_token:
72
+ return None, "ERROR: Hugging Face token (HF_CTB_TOKEN) is missing. Please set it as an environment variable."
73
 
74
  # Find the selected prompt and model
75
  try: