Only load .env file in notebook directory

This commit is contained in:
James Murdza
2025-09-12 14:45:25 -04:00
parent 477612471e
commit 48e42d2334
+4 -4
View File
@@ -54,7 +54,8 @@
"\n",
"import os\n",
"if not os.path.exists(\".env\"):\n",
" open(\".env\", \"w\").write(ENV_TEMPLATE)"
" open(\".env\", \"w\").write(ENV_TEMPLATE)\n",
" print(\"A .env file was created! Fill in the empty values.\")"
]
},
{
@@ -73,11 +74,10 @@
"outputs": [],
"source": [
"# Read the .env file\n",
"# HUD requires the .env file to be in the same directory\n",
"\n",
"from dotenv import load_dotenv\n",
"\n",
"load_dotenv(dotenv_path='../.env')\n",
"load_dotenv(dotenv_path='.env')"
"load_dotenv(dotenv_path='.env', override=True)"
]
},
{