santanavagner commited on
Commit
2d2c889
·
verified ·
1 Parent(s): db513e9

Update helpers/get_credentials.py

Browse files
Files changed (1) hide show
  1. helpers/get_credentials.py +2 -2
helpers/get_credentials.py CHANGED
@@ -47,14 +47,14 @@ def get_credentials():
47
  # Loading hugging face token from env file
48
  default_hf_url = 'https://api-inference.huggingface.co/pipeline/feature-extraction/'
49
  try:
50
- hf_token = os.environ.get('HF_TOKEN')
51
  if not hf_token or hf_token == '<include-token-here>':
52
  raise ValueError
53
  except:
54
  print('Please include your HF_TOKEN in the .env file')
55
  sys.exit(1)
56
  try:
57
- hf_url = os.environ.get('HF_URL')
58
  if not hf_url:
59
  raise ValueError
60
  except:
 
47
  # Loading hugging face token from env file
48
  default_hf_url = 'https://api-inference.huggingface.co/pipeline/feature-extraction/'
49
  try:
50
+ hf_token = os.getenv('HF_TOKEN')
51
  if not hf_token or hf_token == '<include-token-here>':
52
  raise ValueError
53
  except:
54
  print('Please include your HF_TOKEN in the .env file')
55
  sys.exit(1)
56
  try:
57
+ hf_url = os.getenv('HF_URL')
58
  if not hf_url:
59
  raise ValueError
60
  except: