import streamlit as st import os import app_func import extraction # import abstraction st.title("Document Summarizer") sidebar = st.sidebar page = sidebar.radio("Navigation", ["About Project", "Summarization", "Comparision"]) if page == "About Project": pass elif page == "Summarization": uploaded_doc = st.file_uploader("Upload a document", type=["txt", "pdf"]) if uploaded_doc is not None: doc_text = app_func.read_uploaded_doc(uploaded_doc) extractive_summary = extraction.extract_summary(doc_text) # st.write("Extractive Summary:",extractive_summary) # abstractive_summary = abstraction.generate_summary(extractive_summary) st.write("Summary:", extractive_summary)