prernajeet14 commited on
Commit
f756a21
·
verified ·
1 Parent(s): 3723d1b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -58,7 +58,7 @@ metadata_path = os.path.join(VECTOR_DB_PATH, "metadata.pkl")
58
  def init_openai_api():
59
  """Initialize OpenAI API with API key from Colab secrets."""
60
  try:
61
- openai_api_key = userdata.get('OPENAI_API_KEY')
62
  if not openai_api_key:
63
  print("OPENAI_API_KEY not found in Colab secrets.")
64
  return False
@@ -73,7 +73,7 @@ def init_openai_api():
73
  def init_mistral_api():
74
  """Initialize Mistral API with API key from Colab secrets."""
75
  try:
76
- mistral_api_key = userdata.get('MISTRAL_API_KEY')
77
  if not mistral_api_key:
78
  print("MISTRAL_API_KEY not found in Colab secrets.")
79
  return False
 
58
  def init_openai_api():
59
  """Initialize OpenAI API with API key from Colab secrets."""
60
  try:
61
+ openai_api_key = os.environ.get('OPENAI_API_KEY')
62
  if not openai_api_key:
63
  print("OPENAI_API_KEY not found in Colab secrets.")
64
  return False
 
73
  def init_mistral_api():
74
  """Initialize Mistral API with API key from Colab secrets."""
75
  try:
76
+ mistral_api_key = os.environ.get('MISTRAL_API_KEY')
77
  if not mistral_api_key:
78
  print("MISTRAL_API_KEY not found in Colab secrets.")
79
  return False