keys error handling added
Browse files
app.py
CHANGED
@@ -25,9 +25,9 @@ load_dotenv()
|
|
25 |
We will load our environment variables here.
|
26 |
"""
|
27 |
try:
|
28 |
-
HF_LLM_ENDPOINT = os.
|
29 |
-
HF_EMBED_ENDPOINT = os.
|
30 |
-
HF_TOKEN = os.
|
31 |
except KeyError as e:
|
32 |
raise EnvironmentError(f"Missing environment variable: {e}")
|
33 |
|
|
|
25 |
We will load our environment variables here.
|
26 |
"""
|
27 |
try:
|
28 |
+
HF_LLM_ENDPOINT = os.getenv('HF_LLM_ENDPOINT')
|
29 |
+
HF_EMBED_ENDPOINT = os.getenv('HF_EMBED_ENDPOINT')
|
30 |
+
HF_TOKEN = os.getenv('HF_TOKEN')
|
31 |
except KeyError as e:
|
32 |
raise EnvironmentError(f"Missing environment variable: {e}")
|
33 |
|