a
     ɝh                     @   s   d dl ZG dd dZdS )    Nc                   @   s.   e Zd ZdZddddZdd Zdd	 ZdS )
	MultiPagez7Framework for combining multiple streamlit applicationsN)returnc                 C   s
   g | _ d S )N)pages)self r   #/var/www/html/AI4Kappa/multipage.py__init__	   s    zMultiPage.__init__c                 C   s   | j ||d dS )zAdd a new page to the app
        
        Args:
            title: The title of page
            func: The function to call for this page
        )titlefunctionN)r   append)r   r	   funcr   r   r   add_page   s
    zMultiPage.add_pagec                 C   s&   t jjd| jdd d}|d   dS )zRun the selected pagezapp navigationc                 S   s   | d S )Nr	   r   )pager   r   r   <lambda>       zMultiPage.run.<locals>.<lambda>)format_funcr
   N)stsidebar	selectboxr   )r   r   r   r   r   run   s    zMultiPage.run)__name__
__module____qualname____doc__r   r   r   r   r   r   r   r      s   r   )	streamlitr   r   r   r   r   r   <module>   s   