✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
⚡️ Concerned about the grid? Kyle Baranko teaches how to predicting peak loads using XGBoost. Register for the August webinar!

Unable to deploy my Dash application in heroku

I have already run the same python script in my local machine which runs properly. But when i was deploying in heroku, following error was thrown.

dash.exceptions.NoLayoutException: The layout was None at the time that run_server was called. Make sure to set the layout attribute of your application before running the server.

Although I have specified my layout in the main() function of my script.

app.layout = html.Div([navbar, body])
app.run_server()