import streamlit as st import image2text import intro import text2image import text2patch from config import MODEL_LIST PAGES = { "Introduction": intro, "Text to Image": text2image, "Image to Text": image2text, "Text to Patch": text2patch, } st.sidebar.title("Navigation") model = st.sidebar.selectbox("Choose a model", MODEL_LIST) page = st.sidebar.selectbox("Navigate to...", list(PAGES.keys())) PAGES[page].app(model)