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