Update helpers/get_credentials.py
Browse files
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.
|
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.
|
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:
|