Anupam007 commited on
Commit
f4c8592
·
verified ·
1 Parent(s): 54b40cb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -7,7 +7,9 @@ import toml # Import the toml library
7
 
8
  # Load secrets from secrets.toml
9
  try:
10
- secrets = toml.load("secrets.toml")
 
 
11
  GEMINI_API_KEY = secrets["AIzaSyC_MFgpk5t3woYooMIPkIA5-Kzaon13-m0"]
12
  except FileNotFoundError:
13
  print("Error: secrets.toml not found. Make sure it exists in the same directory.")
 
7
 
8
  # Load secrets from secrets.toml
9
  try:
10
+ # Use os.path.join to ensure correct path
11
+ secrets_path = os.path.join(os.path.dirname(__file__), "secrets.toml")
12
+ secrets = toml.load(secrets_path)
13
  GEMINI_API_KEY = secrets["AIzaSyC_MFgpk5t3woYooMIPkIA5-Kzaon13-m0"]
14
  except FileNotFoundError:
15
  print("Error: secrets.toml not found. Make sure it exists in the same directory.")