Spaces:
Runtime error
Runtime error
File size: 441 Bytes
6554f2c 9afe3a7 6554f2c 9afe3a7 c7070e4 9afe3a7 6554f2c 9afe3a7 6554f2c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
"""Frameworks for running multiple Streamlit applications as a single app.
"""
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("Navigation")
app = st.sidebar.selectbox("", self.apps, format_func=lambda app: app["title"])
app["function"]()
|