Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -303,6 +303,16 @@ def serve_layout():
|
|
303 |
|
304 |
app.layout = serve_layout
|
305 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
306 |
@callback(Output('figure-tooltip', 'show'),
|
307 |
Output('figure-tooltip', 'bbox'),
|
308 |
Output('figure-tooltip', 'children'),
|
@@ -325,16 +335,6 @@ def display_hover(hoverData):
|
|
325 |
|
326 |
return True, bbox, children
|
327 |
|
328 |
-
@callback(Output('layout-content', 'children'),
|
329 |
-
Output('base-figure', 'figure'),
|
330 |
-
Input('interval-component', 'n_intervals'),
|
331 |
-
)
|
332 |
-
def refresh_layout(n):
|
333 |
-
global fig
|
334 |
-
fig = plot_fig()
|
335 |
-
layout = serve_layout()
|
336 |
-
return fig, layout
|
337 |
-
|
338 |
if __name__ == '__main__':
|
339 |
app.run(debug=False, host='0.0.0.0', port=7860)
|
340 |
|
|
|
303 |
|
304 |
app.layout = serve_layout
|
305 |
|
306 |
+
@callback(Output('layout-content', 'children'),
|
307 |
+
Output('base-figure', 'figure'),
|
308 |
+
Input('interval-component', 'n_intervals'))
|
309 |
+
def refresh_layout(n):
|
310 |
+
global fig
|
311 |
+
fig = plot_fig()
|
312 |
+
layout = serve_layout()
|
313 |
+
return fig, layout
|
314 |
+
|
315 |
+
|
316 |
@callback(Output('figure-tooltip', 'show'),
|
317 |
Output('figure-tooltip', 'bbox'),
|
318 |
Output('figure-tooltip', 'children'),
|
|
|
335 |
|
336 |
return True, bbox, children
|
337 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
338 |
if __name__ == '__main__':
|
339 |
app.run(debug=False, host='0.0.0.0', port=7860)
|
340 |
|