diff --git a/src/utils/cli.py b/src/utils/cli.py index e855f706..a140bb46 100644 --- a/src/utils/cli.py +++ b/src/utils/cli.py @@ -3,7 +3,7 @@ import argparse import pathlib # Internal Packages -from src.utils.helpers import get_absolute_path, resolve_absolute_path +from src.utils.helpers import resolve_absolute_path from src.utils.yaml import parse_config_from_file diff --git a/src/utils/helpers.py b/src/utils/helpers.py index 78c2f176..e77e656d 100644 --- a/src/utils/helpers.py +++ b/src/utils/helpers.py @@ -1,5 +1,6 @@ # Standard Packages import pathlib +import sys from os.path import join @@ -54,4 +55,9 @@ def load_model(model_name, model_dir, model_type): if model_path is not None: model.save(model_path) - return model \ No newline at end of file + return model + + +def is_pyinstaller_app(): + "Returns true if the app is running from Native GUI created by PyInstaller" + return getattr(sys, 'frozen', False) and hasattr(sys, '_MEIPASS') \ No newline at end of file