File size: 889 Bytes
8f76218
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
from .my_dashboard import dashboard as my_dashboard
from typing import Dict, Callable


app_routes = {
    "/": main_layout,
    "/my_dashboard": my_dashboard,
}

def app() -> Dict[str, Callable]:
    return app_routes


pn.extension(sizing_mode="stretch_width")

nav_markdown = """
# Navigation
- [My Dashboard](/my_dashboard)
"""

navigation = pn.Markdown(nav_markdown)

main_layout = pn.Column(
    navigation,
    # other components and layouts
)

INTRO = """
# Awesome Panel on Hugging Face Spaces
... (rest of the content)
"""

some_component = pn.panel(INTRO)



template = pn.template.FastListTemplate(
    site="Awesome Panel 🤗", title="Hello Hugging Face World", main=[some_component],
    favicon="https://sharing.awesome-panel.org/favicon.ico", accent="#fef3c7", header_color="#4b5563"
)

app = pn.serve({'/': template, '/my_dashboard': my_dashboard_app}, return_views=True)