🏥 🏭 Working on the COVID-19 response in Canada? Plotly & the Canadian government can help you and your organization. Learn more and get in touch.

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])