File size: 512 Bytes
405f2d4
2c8f495
 
405f2d4
2c8f495
405f2d4
2c8f495
 
405f2d4
 
2c8f495
405f2d4
ea304d0
e8898f0
2c8f495
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import streamlit as st
from session import _get_state

class MultiApp:
    def __init__(self, state):
        self.apps = []
        self.state = state

    def add_app(self, title, func):
        self.apps.append({"title": title, "function": func})

    def run(self):
        logo = st.sidebar.image("./misc/mvqa-logo-3-white.png")
        st.sidebar.header("Go To:")
        app = st.sidebar.radio(
            "", self.apps, format_func=lambda app: app["title"]
        )
        app["function"](self.state)