Sliders not appearing on Plot.ly graphs

I have copied the example code to generate a 3D plot with a single updating slider, unfortunately the slider does not appear on my plot.

python - 3.7
plotly - 4.2.1
notebook - 5.3
ipywidgets - 7.2

Any help welcome,

Best

Craggles

import plotly.graph_objs as go
import plotly.offline as py

import numpy as np
from ipywidgets import interactive, HBox, VBox

py.init_notebook_mode()

x = y = np.arange(-5, 5, 0.1)
yt = x[:, np.newaxis]
z = np.cos(x * yt) + np.sin(x * yt) * 2

f = go.FigureWidget(
    data=[
        go.Surface(z=z, x=x, y=y,
                   colorscale='Viridis')],
    layout=go.Layout(scene=go.layout.Scene(
        camera=go.layout.scene.Camera(
            up=dict(x=0, y=0, z=1),
            center=dict(x=0, y=0, z=0),
            eye=dict(x=1.25, y=1.25, z=1.25))
    ))
)


def update_z(frequency):
    f.data[0].z = np.cos(x * yt * frequency / 10.0) + np.sin(x * yt * frequency / 10.0) * 2


freq_slider = interactive(update_z, frequency=(1, 50, 0.1))
vb = VBox((f, freq_slider))
vb.layout.align_items = 'center'

from plotly.offline import plot

plot(f)

@craggles17 You are displaying only the plotly figure wuth the last line, plot(f).

Just comment the last two lines and display the VBox (the Vertical Box that contains the 3d figure and the slider) by inserting the line

vb

Is there anyway of exporting that vbox to an offline HTML?

@craggles17 Recently I learned that voila https://github.com/voila-dashboards/voila turns Jupyter notebooks into standalone web applications, but I haven’t installed it yet to see how it works.