Running dash app from inside an already running flask instance

I have a flask server running. Also I have a dash app created separately but not running yet. I want the code inside my flask server to run my dash app(based on some conditions) and I try to achieve that by initiating a subprocess that runs command like- “python dash_app.py”. However I see this message on execution- “Silently ignoring app.run() because the application is run from the flask command line executable. Consider putting app.run() behind an if name == “main” guard to silence this warning.”

How do I overcome this ?

As far as I know you can make the Dash App accesible on a routhe of the flask Server. Check out the documentation Dash User Guide -> Integrating Dash with existing Web Apps