import streamlit as st import image2text import text2image import text2patch PAGES = { "Text to Image": text2image, "Image to Text": image2text, "Patch Importance Ranking": text2patch, } st.sidebar.title("Navigation") model = st.sidebar.selectbox("Choose a model", ["koclip-base", "koclip-large"]) page = st.sidebar.selectbox("Choose a task", list(PAGES.keys())) PAGES[page].app(model)