putting-nerf-on-a-diet / multiapp.py
sseung0703's picture
Create multiapp.py
3cffd1e
raw
history blame
346 Bytes
import streamlit as st
class MultiApp:
def __init__(self):
self.apps = []
def add_app(self, title, func):
self.apps.append({"title": title, "function": func})
def run(self):
st.sidebar.header("Tasks")
app = st.sidebar.radio("", self.apps, format_func=lambda app: app["title"])
app["function"]()