Spaces:
Sleeping
Sleeping
File size: 533 Bytes
05cb41b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | import os
from dotenv import load_dotenv
# Load variables from the .env file
load_dotenv()
class Settings:
GEMINI_API_KEY = os.getenv("GEMINI_API_KEY")
# Defaults to local MongoDB if no URI is provided in .env
MONGO_URI = os.getenv("MONGO_URI", "mongodb+srv://sudhanp2004:root@cluster0.wsmrt.mongodb.net/?retryWrites=true&w=majority&appName=Cluster0")
DB_NAME = "plum_opd_db"
settings = Settings()
if not settings.GEMINI_API_KEY:
raise ValueError("GEMINI_API_KEY is missing. Please add it to your .env file.") |