Go.sunburst on Flask

Hey, I am new to plotly and trying to make plots on a flask server without Dash.
I saw a tutorial on how to work with plotly in flask and it works for go.Table and go.Scatter. However, there is a blank output for go.Sunburst.
To make sure I was doing it correctly, I plotted the go.Sunburst on a Jupyter notebook and it worked there. Could you help me out here?
I have added pictures of my implementation on the Jupyter as well as the Flask file. The Flask file implementation contains code inside the @app.route and the HTML.

The Flask code for sunburst is exactly the same as the scatter plot with the exception of the fig.add_trace()


Screenshot 2021-05-13 at 2.04.17 PM