Multilingual-VQA / multiapp.py
gchhablani's picture
Update nav header
e8898f0
raw
history blame
549 Bytes
import streamlit as st
from session import _get_state
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.title("Multilingual VQA")
logo = st.sidebar.image("./misc/mvqa-logo-3-white.png")
st.sidebar.header("Go To:")
app = st.sidebar.radio(
"", self.apps, format_func=lambda app: app["title"]
)
app["function"](self.state)