import os BASE_DIR = os.path.dirname(os.path.abspath('app.py')) # Note app.py is in 'Code File', BASE_DIR is one level up print("Current folder:", os.getcwd())