import streamlit as st from summarize import summarize_text from generate_answers import get_answer from utils import extract_text_from_pdf st.title("By:- Akshat Thakkar , Kartik Raghuvanshi") st.title("📄 BERT-based Question Answering on PDF (with T5 Summarization)") uploaded_file = st.file_uploader("Upload a PDF document", type="pdf") if uploaded_file: raw_text = extract_text_from_pdf(uploaded_file) summary = summarize_text(raw_text) st.subheader("📋 Summary of the Document") st.write(summary) question = st.text_input("❓ Ask a Question Based on the Summary") if question: answer = get_answer(question, summary) st.subheader("✅ Answer") st.write(answer)