Spaces:
Sleeping
Sleeping
| import panel as pn | |
| # Initialize the Panel extension (necessary for notebooks) | |
| pn.extension() | |
| # Function to create a button with a link | |
| def create_link_button(label, url): | |
| button = pn.widgets.Button(name=label, button_type='primary') | |
| button.js_on_click(code=f"window.open('{url}', '_blank')") | |
| return button | |
| # Create buttons linking to the Jupyter notebooks | |
| notebook_buttons = [ | |
| create_link_button("Setup", "http://localhost:1001"), | |
| create_link_button("Quality_Control", "http://localhost:1002"), | |
| create_link_button("Background-Subtraction", "http://localhost:1003"), | |
| create_link_button("Z-Score Computation", "http://localhost:1004"), | |
| create_link_button("Marker Threshold", "http://localhost:1005"), | |
| create_link_button("Classification", "http://localhost:1006"), | |
| ] | |
| # Arrange the buttons into columns | |
| columns = [pn.Column(button, width=200) for button in notebook_buttons] | |
| # Create the MaterialTemplate with the columns in the main area | |
| app = pn.template.MaterialTemplate( | |
| title="Analysis", | |
| site="Cyc-IF", | |
| sidebar=[ | |
| pn.pane.Markdown("# README"), | |
| pn.pane.Markdown("This space provides an overview of the platform's usage, highlights its features, and includes a navigation guide."), | |
| ], | |
| main=pn.Row(*columns), | |
| ) |