flask define template folder

import os
from flask import Flask

template_dir = os.path.abspath('../../frontend/src')
app = Flask(__name__, template_folder=template_dir)

Here is what the above code is Doing:
1. We’re importing the os module, which provides functions for interacting with the operating system.
2. We’re setting the template_dir variable to the absolute path of the frontend/src directory.
3. We’re creating a Flask instance called app.
4. We’re passing the template_folder argument to the Flask constructor, which tells Flask where to look for templates.