Spaces:
Runtime error
Runtime error
File size: 417 Bytes
54dc7b4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
import streamlit as st
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):
st.sidebar.header("Go To:")
app = st.sidebar.radio(
"", self.apps, format_func=lambda app: app["title"]
)
app["function"](self.state)
|