diff --git a/Backend/backend.py b/Backend/backend.py index 3bbba2b..0f07ffb 100644 --- a/Backend/backend.py +++ b/Backend/backend.py @@ -32,6 +32,11 @@ jwt = JWTManager(app) +@app.before_first_request +def before_first_request(): + db_access.db_connect() + + @app.route("/generate_image", methods=["POST"]) @jwt_required() def generate_image():