design-project / app.py
abxhr's picture
Modify App
c4fc0ca
raw
history blame contribute delete
No virus
1.02 kB
import awesome_streamlit as ast
import streamlit as st
from backend.utils import get_current_ram_usage, ga
import backend.aragpt
import backend.home
import backend.processor
import backend.sa
import backend.qa
st.set_page_config(
page_title="TEST", page_icon="📖", initial_sidebar_state="expanded", layout="wide"
)
ga(st.__file__)
PAGES = {
"Home": backend.home,
"Arabic Sentiment Analysis": backend.sa,
"Arabic Question Answering": backend.qa,
}
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("Arabic NLP by [**Abshar Mohammed Aslam** (*2019A7PS0233U*)](https://github.com/abxhr)")
st.sidebar.write("Submitted to *Dr. Sujala D. Shetty*")
# if st.sidebar.checkbox("Show RAM usage"):
# ram = get_current_ram_usage()
# st.sidebar.write("Ram usage: {:.2f}/{:.2f} GB".format(ram[0], ram[1]))