Andre commited on
Commit
57af060
·
1 Parent(s): 09faead

“Update”

Browse files
Files changed (2) hide show
  1. config/config.py +2 -2
  2. src/img_gen.py +1 -1
config/config.py CHANGED
@@ -4,11 +4,11 @@ from config.prompts import prompts # Import prompts from prompts.py
4
  from config.models import models
5
 
6
  # Retrieve the Hugging Face token
7
- #pi_token = os.getenv("HF_CTB_TOKEN")
8
 
9
  # Debugging: Check if the Hugging Face token is available
10
  if not api_token:
11
- print("ERROR: Hugging Face token (HF_CTB_TOKEN) is missing. Please set it as an environment variable or in Colab secrets.")
12
  else:
13
  print("Hugging Face token loaded successfully.")
14
 
 
4
  from config.models import models
5
 
6
  # Retrieve the Hugging Face token
7
+ api_token = os.getenv("HF_CTB_TOKEN")
8
 
9
  # Debugging: Check if the Hugging Face token is available
10
  if not api_token:
11
+ print("ERROR1: Hugging Face token (HF_CTB_TOKEN) is missing. Please set it as an environment variable or in Colab secrets.")
12
  else:
13
  print("Hugging Face token loaded successfully.")
14
 
src/img_gen.py CHANGED
@@ -20,7 +20,7 @@ def generate_image(prompt_alias, team, model_alias, custom_prompt, height=360, w
20
  api_token = os.getenv("HF_CTB_TOKEN")
21
 
22
  if not api_token:
23
- return None, "ERROR: Hugging Face token (HF_CTB_TOKEN) is missing. Please set it as an environment variable."
24
 
25
  # Find the selected prompt and model
26
  try:
 
20
  api_token = os.getenv("HF_CTB_TOKEN")
21
 
22
  if not api_token:
23
+ return None, "ERROR2: Hugging Face token (HF_CTB_TOKEN) is missing. Please set it as an environment variable."
24
 
25
  # Find the selected prompt and model
26
  try: