parserPDF / globals.py
semmyk's picture
baseline08_beta0.3.1_01Oct25: refactor progress feedback, gradio ui tweak, weasyprint dll path
7757db2
raw
history blame
516 Bytes
# opted for sigleton as opposed to global variable
# Create a singleton object to hold all shared states
# This ensures that only one instance of the Config class is ever created
class Config:
""" Single model_dict use across the app"""
def __init__(self):
self.model_dict = {}
self.weasyprint_libpath = ""
self.config_ini = "utils\\config.ini"
# Create a single, shared instance of the Config class
# Other modules will import and use this instance.
config_load_models = Config()