title: How to save my python script with widget to html page?
body: <p>With my first python script, I was able to export my script in html :</p>
  
  <pre><code>import pandas as pd
  import plotly.express as px
  
  
  df = pd.read_csv('xxxx/Test.txt')
  df.head()
  
  fig = px.line(df, x = 'Date', y ='Total Used', title='DF command graph')
  fig.add_scatter(x=df['Date'], y=df['Free'])
  
  fig.update_traces(mode='markers+lines')
  fig.write_html("/xxx/xxx/xxx/file.html")
  fig.show()
  
  </code></pre>
  
  <p>Now, I've this script in python :</p>
  
  <pre><code>import ipywidgets as widgets
  import pandas as pd
  import plotly.express as px
  
  button = widgets.Button(description="graph")
  display(button)
  
  def graph():
      df = pd.read_csv('/xxx/xxx/xxx/Test.txt')
      df.head()
      fig = px.line(df, x = 'Date', y ='Total Used', title='DF command graph')
      fig.update_traces(mode='markers')
      fig.show();
  
  output = widgets.Output()
  
  @output.capture()
  def on_button_clicked(b):
      graph();
  
  button.on_click(on_button_clicked)
  display(output)
  </code></pre>
  
  <p>There is an easy way to save it in html while keeping the interaction with the button ?</p>