how to export ipywidgets function into HTML file

تبليغ
سؤال

يرجى شرح بإيجاز لمإذا تشعر أنك ينبغي الإبلاغ عن هذا السؤال.

تبليغ
‎إلغاء

I am using ipywidgets to create a dashboard, I need to export that dashboard into HTML as well. Code is as below:

import ipywidgets as widgets
from IPython.display import display, clear_output
def testt(df):
out3 = widgets.Output()
tab = widgets.Tab(children = [out3])
display(tab)
with out3:
def check_correlation(df):
corr_matrix = df.corr()
fig = px.imshow(corr_matrix)
fig.show()
check_correlation(df)

I have tried to use ipywidgets.embed but I can’t find a way to import the whole function in it, is there another solution to do so?

Code to export my whole function:

from ipywidgets.embed import embed_minimal_html as emh

emh(‘export.html’,views = [tab,out1], title = ‘testing’)

but this is not working and just showing the tab in HTML page.

and this code is insider the testt(df) function. Also if there is any other way to do so please tell me.

‫أضف إجابة

تصفح
تصفح

مجهول يجيب