【发布时间】:2021-10-24 16:19:02
【问题描述】:
我的工作机器上没有互联网连接,但我想使用 dash。当我尝试使用
运行我的代码时app.css.config.serve_locally = True
app.scripts.config.serve_locally = True
我也只有白屏,没有任何图形或错误。
这里以一些简单的代码为例:
from jupyter_dash import JupyterDash
import dash_core_components as dcc
import dash_html_components as html
app = JupyterDash('offline example')
app.layout = html.Div([
dcc.Graph(id='my-graph', figure={'data': [{'x': [1, 2, 3], 'y': [4, 1, 2]}]})
])
app.css.config.serve_locally = True
app.scripts.config.serve_locally = True
if __name__ == '__main__':
app.run_server(mode=“Inline”)
【问题讨论】:
标签: jupyter-notebook plotly plotly-dash offline jupyterdash