EmreYY20
update
a0ac68c
raw
history blame
515 Bytes
import streamlit as st
from extractive_model import summarize_pdf_with_textrank
st.title("PDF Summarization App")
pdf_file = st.file_uploader("Upload a PDF file", type=["pdf"])
if pdf_file is not None and st.button("Summarize"):
# Save uploaded PDF to a temporary file
with open("temp_pdf.pdf", "wb") as f:
f.write(pdf_file.getbuffer())
# Generate summary
summary = summarize_pdf_with_textrank("temp_pdf.pdf")
# Display summary
st.write("Summary:")
st.write(summary)