nisargvp commited on
Commit
589759d
1 Parent(s): c16a691

keys error handling added

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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.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
 
 
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