Pyviz integration with Panel

unlike matplotlib, pyviz creates an interactive html file. I do not know how to interface this with Panel.
consider example below:

from pyvis import network as net
import networkx as nx
def plotter(plot_size=5):
      g = net.Network(notebook=True)
      nxg = nx.complete_graph(plot_size)
import panel as pn 

this either does not show an image, or when it does, everytime i change the plot_size it reopens my browser and create a new page rather than updating the current graph.