def init_viewer():

    global crystal_toolkit_viewer
    global crystal_toolkit_app

    crystal_toolkit_viewer = jupyterlab_dash.AppViewer(port=8095)
    crystal_toolkit_app = dash.Dash(__name__)
Exemplo n.º 2
0
def _init_viewer():

    global crystal_toolkit_viewer
    global crystal_toolkit_app

    # let OS choose next available port
    crystal_toolkit_viewer = jupyterlab_dash.AppViewer(port=0)
    crystal_toolkit_app = dash.Dash(__name__)
Exemplo n.º 3
0
def show_pipeline():
    pipeline = load_pipeline()
    from pycarol.pipeline.viewer.dash_plot import get_app_from_pipeline
    app = get_app_from_pipeline(pipeline)

    import jupyterlab_dash
    import dash
    import dash_html_components as html
    viewer = jupyterlab_dash.AppViewer()
    viewer.show(app)
Exemplo n.º 4
0
def testLayoutInJupyter(layout=html.H1('hello')):
    if not inJupyter:
        return

    global viewer

    app = dash.Dash(__name__)
    app.layout = layout

    if not 'viewer' in globals():  #create the viewer once
        viewer = jupyterlab_dash.AppViewer()

    viewer.show(app)
    return viewer
Exemplo n.º 5
0
            df.query(f'id=={round(customdata)}')

            URL = list(df.query(f'id=={round(customdata)}').permalink)[0]
            linkToHub = html.A(f'>>>hub.e-nable.org<<<<',
                               href=URL,
                               target='_hub'),

            return [threadRet, queryRet, linkToHub]

    return ['', '', '']


if inJupyter:  #this allows running via python
    if not 'viewer' in globals().keys():  #create the viewer once
        viewer = jupyterlab_dash.AppViewer()
    viewer.show(app)
else:
    if __name__ == "__main__":
        app.run_server(debug=True)

# %%
df.columns

# %%
# #!python macrosmodule.py  #you can interrupt kernel to stop

# %%

# %%