Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -10,7 +10,7 @@ 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.")
|
| 16 |
GEMINI_API_KEY = None # Or some default value
|
|
|
|
| 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"] # Corrected Line! Access the key *by name*
|
| 14 |
except FileNotFoundError:
|
| 15 |
print("Error: secrets.toml not found. Make sure it exists in the same directory.")
|
| 16 |
GEMINI_API_KEY = None # Or some default value
|