gchhablani's picture
Add mask filling app
2c8f495
raw
history blame
1.84 kB
from apps import mlm, vqa
import os
import streamlit as st
from session import _get_state
from multiapp import MultiApp
def read_markdown(path, parent="./sections/"):
with open(os.path.join(parent, path)) as f:
return f.read()
def main():
state = _get_state()
st.set_page_config(
page_title="Multilingual VQA",
layout="wide",
initial_sidebar_state="collapsed",
page_icon="./misc/mvqa-logo-3-white.png",
)
st.title("Multilingual Visual Question Answering")
st.write(
"[Gunjan Chhablani](https://huggingface.co/gchhablani), [Bhavitvya Malik](https://huggingface.co/bhavitvyamalik)"
)
image_col, intro_col = st.beta_columns([3, 8])
image_col.image("./misc/mvqa-logo-3-white.png", use_column_width="always")
intro_col.write(read_markdown("intro.md"))
with st.beta_expander("Usage"):
st.write(read_markdown("usage.md"))
with st.beta_expander("Article"):
st.write(read_markdown("abstract.md"))
st.write(read_markdown("caveats.md"))
st.write("## Methodology")
col1, col2 = st.beta_columns([1, 1])
col1.image(
"./misc/article/Multilingual-VQA.png",
caption="Masked LM model for Image-text Pretraining.",
)
col2.markdown(read_markdown("pretraining.md"))
st.markdown(read_markdown("finetuning.md"))
st.write(read_markdown("challenges.md"))
st.write(read_markdown("social_impact.md"))
st.write(read_markdown("references.md"))
st.write(read_markdown("checkpoints.md"))
st.write(read_markdown("acknowledgements.md"))
app = MultiApp(state)
app.add_app("Visual Question Answering", vqa.app)
app.add_app("Mask Filling", mlm.app)
app.run()
state.sync()
if __name__ == "__main__":
main()