When I run dash app using the code below in jupyterlab (AWS Sagemaker), the plot is blank.
from dash import Dash, html, dcc, Output, Input, callback
import plotly.express as px
import pandas as pd
app = Dash(__name__)
app.layout = html.Div(children='Hello World')
if __name__ == '__main__':
app.run_server(debug=True)
Library versions:
- Flask==2.1.0
- Werkzeug==2.2.2
- dash ==2.18.2 (version above 2.11 for inline display in jupyterlab)
- plotly == 5.24.1
- jupyterlab == 4.3.4
Blank output: Output
To display "Hello World" in the dashboard.
Dashis not defined anywhere. Did you forget to import some libraries? The code you posted in not complete and depends on the previous execution of other cells which you haven;t posted.plotly[express]andpandasas requirements with those imports but it then ran in the browser displaying "Hello World" - there was no involvement from jupyter.