How to use omniplot.plot in streamlit and show the omniplot.plot chart in stramlit app

dear boss

see below code for nested chart To utilize omniplot.plot within a Streamlit application and display the corresponding chart, please provide guidance on the correct command to render the omniplot.plot output in the Streamlit app. The command st.pyplot(op) did not successfully display the output.

import pandas as pd
import omniplot.plot as op
import matplotlib.pyplot as plt

df = pd.DataFrame([['Bad', 'Female', 419],
                   ['Good', 'Male', 1419],
                   ['Bad', 'Male', 1542],
                   ['Good', 'Genderless', 4],
                   ['Good', 'Female', 714],
                   ['Neutral', 'Female', 138], 
                   ['Neutral', 'Male', 254],
                   
                   ['Bad', 'Genderless', 9], 
                   
                   ['Neutral', 'Genderless', 3], 
                   ['Reformed', 'Male', 2]])
df.columns = ['ALIGN', 'SEX', 'n']
op.nested_piechart(df=df, category=['ALIGN', 'SEX'], variable="n")
# optionally plt.savefig("test.png") or plt.show()

Create the matplotlib Figure and Axes first, pass the axes object to the plotting function and pass the figure object to st.pyplot

...

fig, ax = plt.subplots()
op.nested_piechart(df=df, category=["ALIGN", "SEX"], variable="n", ax=ax)
st.pyplot(fig)