Rulga commited on
Commit
879929a
·
1 Parent(s): 4f531f0

Refactor settings.py: Update token retrieval to use 'pro_api_token_2' and improve error message for missing token

Browse files
Files changed (1) hide show
  1. config/settings.py +2 -2
config/settings.py CHANGED
@@ -4,9 +4,9 @@ from huggingface_hub import HfApi
4
 
5
  # API tokens
6
  #HF_TOKEN = os.getenv("HUGGINGFACE_TOKEN")
7
- HF_TOKEN = os.getenv("pro_api_token")
8
  if not HF_TOKEN:
9
- raise ValueError("pro_api_token not found in environment variables")
10
  #raise ValueError("HUGGINGFACE_TOKEN not found in environment variables")
11
 
12
  # API Configuration
 
4
 
5
  # API tokens
6
  #HF_TOKEN = os.getenv("HUGGINGFACE_TOKEN")
7
+ HF_TOKEN = os.getenv("pro_api_token_2")
8
  if not HF_TOKEN:
9
+ raise ValueError("pro_api_token_2 not found in environment variables")
10
  #raise ValueError("HUGGINGFACE_TOKEN not found in environment variables")
11
 
12
  # API Configuration