Source code for neuralib.dashboard.example_multi

from bokeh.model import Model
from bokeh.models import Div

from neuralib.dashboard import View, BokehServer


[docs] class Top(View): @property def title(self) -> str: return 'A'
[docs] def setup(self) -> Model: from bokeh.layouts import column return column(Div(text='root'), Div(text='<a href="pool" >pool</a>'))
[docs] class Pool(View): @property def title(self) -> str: return 'B'
[docs] def setup(self) -> Model: from bokeh.layouts import column return column(Div(text='pool'))
if __name__ == '__main__': VIEW_TOP = Top() VIEW_POOL = Pool() BokehServer().start({'/': VIEW_TOP, '/pool': VIEW_POOL})