code: def launch_in_notebook(self, port=9095, width=900, height=600):
          
          from IPython.lib import backgroundjobs as bg
          from IPython.display import HTML
  
          jobs = bg.BackgroundJobManager()
          jobs.new(self.launch, kw=dict(port=port))
          frame = HTML(
              '<iframe src=http://localhost:{} width={} height={}></iframe>'
              .format(port, width, height)
          )
          return frame
docs: launch the app within an iframe in ipython notebook