def load_data(): try: with open('system.pickle','rb') as file: system = pickle.load(file) except IOError: system = bootstrap_system() print("Initialize new system") return system
from flask import Flask from init import bootstrap_system app = Flask(__name__) app.secret_key = 'very-secret-123' system = bootstrap_system()
def sys(): sys = bootstrap_system() return sys