diff --git a/app.py b/app.py index cde7c608..1226e1ae 100644 --- a/app.py +++ b/app.py @@ -84,7 +84,7 @@ def main(): st.subheader("Your documents") pdf_docs = st.file_uploader( "Upload your PDFs here and click on 'Process'", accept_multiple_files=True) - if st.button("Process"): + if pdf_docs and st.button("Process"): with st.spinner("Processing"): # get pdf text raw_text = get_pdf_text(pdf_docs)