TURNA / app.py
yirmibesogluz's picture
Added paraphrasing to main app
6a67c51
raw
history blame
844 Bytes
import awesome_streamlit as ast
import streamlit as st
from transformers import pipeline
import apps.summarization
import apps.home
import apps.paraphrasing
st.set_page_config(
page_title="Turna",
page_icon="πŸ“–",
layout='wide'
)
PAGES = {
"Turna": apps.home,
"Text Summarization": apps.summarization,
"Text Paraphrasing": apps.paraphrasing
}
st.sidebar.title("Navigation")
selection = st.sidebar.radio("Pages", list(PAGES.keys()))
page = PAGES[selection]
# with st.spinner(f"Loading {selection} ..."):
ast.shared.components.write_page(page)
st.sidebar.header("Info")
st.sidebar.write(
"Models are available on [HF Hub](https://huggingface.co/collections/boun-tabi-LMG)"
)
st.sidebar.write(
"Model source code available on [GitHub](https://github.com/boun-tabi-LMG/turkish-lm-tuner)"
)