Download shared_ui/shell.py from dmsaylor/CHRIS: direct link, hf CLI and curl.
- Browser
- Download file 1.35 kB
-
https://huggingface.co/spaces/dmsaylor/CHRIS/resolve/main/shared_ui/shell.py
- Command line
-
hf download hf://spaces/dmsaylor/CHRIS/shared_ui/shell.py
-
curl -L -o shell.py https://huggingface.co/spaces/dmsaylor/CHRIS/resolve/main/shared_ui/shell.py
1.35 kB
| from dash import dcc, html | |
| def build_header(tool_title, links): | |
| return html.Header( | |
| html.Div([ | |
| html.A( | |
| html.Img( | |
| src="/assets/gov-fda-new-white.svg", | |
| alt="U.S. Food and Drug Administration", | |
| className="fda-logo", | |
| ), | |
| href="/", | |
| className="site-brand", | |
| ), | |
| html.Span(tool_title, className="site-tool-title"), | |
| html.Nav( | |
| [ | |
| dcc.Link(label, href=path) | |
| for label, path in links | |
| ], | |
| className="site-nav", | |
| **{"aria-label": "Main navigation"}, | |
| ), | |
| ], className="site-container site-header-inner"), | |
| className="site-header", | |
| ) | |
| def build_footer(text, links=()): | |
| return html.Footer( | |
| html.Div( | |
| [ | |
| html.Small(text), | |
| html.Nav( | |
| [ | |
| dcc.Link(label, href=path) | |
| for label, path in links | |
| ], | |
| **{"aria-label": "Footer navigation"}, | |
| ) if links else None, | |
| ], | |
| className="site-container site-footer-inner", | |
| ), | |
| className="site-footer", | |
| ) |