title: Running dash from jupyter notebook
body: <p>I am trying to run dash through jupyter notebook but the app is not launching. I get SystemExit: 1 error. Kindly help. I am not asking to run within notebook but just to launch the web app. if I use a app.py file, it runs but why I can not run through jupyter notebook?</p>
  
  <pre><code>'''
  import dash
  import dash_cytoscape as cyto
  import dash_html_components as html
  
  app = dash.Dash(__name__)
  app.layout = html.Div([
      cyto.Cytoscape(
          id='cytoscape',
          elements=[
              {'data': {'id': 'one', 'label': 'Node 1'}, 'position': {'x': 50, 'y': 50}},
              {'data': {'id': 'two', 'label': 'Node 2'}, 'position': {'x': 200, 'y': 200}},
              {'data': {'source': 'one', 'target': 'two','label': 'Node 1 to 2'}}
          ],
          layout={'name': 'preset'}
      )
  ])
  
  if __name__ == '__main__':
      app.run_server(debug=True,port=5001)
  
  </code></pre>
  
  <p>I get this error:</p>
  
  <pre><code>Running on http://127.0.0.1:5001/
  Running on http://127.0.0.1:5001/
  Debugger PIN: 699-998-824
  Debugger PIN: 699-998-824
   * Serving Flask app "__main__" (lazy loading)
   * Environment: production
     WARNING: Do not use the development server in a production environment.
     Use a production WSGI server instead.
   * Debug mode: on
  An exception has occurred, use %tb to see the full traceback.
  
  SystemExit: 1
  
  
  /anaconda3/lib/python3.7/site-packages/IPython/core/interactiveshell.py:3275: UserWarning:
  
  To exit: use 'exit', 'quit', or Ctrl-D.
  </code></pre>
  
  <p>%tb for this flask issue:</p>
  
  <p><a href="https://i.stack.imgur.com/Cf37a.png" rel="nofollow noreferrer">Flask issue</a></p>