I tried running this code:
import dash
from dash import dcc, Input, Output
from jupyter_dash import JupyterDash
import dash_table as dt
import pandas as pd
import dash_bootstrap_components as dbc
df = pd.read_csv(‘https://git.io/Juf1t’)
external_stylesheets = [dbc.themes.BOOTSTRAP]
app = JupyterDash(external_stylesheets=external_stylesheets)
app.layout = dbc.Container([
dbc.Label(‘Click a cell in the table:’),
dt.DataTable(
id=‘tbl’, data=df.to_dict(‘records’),
columns=[{“name”: i, “id”: i} for i in df.columns],
),
dbc.Alert(“Click the table”, id=‘out’),
])
@app.callback(Output(‘out’, ‘children’), Input(‘tbl’, ‘active_cell’))
def update_graphs(active_cell):
return str(active_cell)
app.run_server(mode=‘inline’,port=2223, debug=True)
Everything runs smoothly except the visualisation does not load and it says Error loading layout.
I tried running the code on Google colab and it works. Is there a way to run it on Colab Enterprise?