From 1f7679cd2edab01fa51a812d78841644cf8bb4d4 Mon Sep 17 00:00:00 2001 From: Rahmani mohamed rami <123117552+Ramyrahmeni@users.noreply.github.com> Date: Sat, 22 Jun 2024 11:56:49 +0100 Subject: [PATCH] code cleaning --- app.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/app.py b/app.py index 53c041d..e352543 100644 --- a/app.py +++ b/app.py @@ -351,13 +351,9 @@ def main(): st.session_state.pdf_uploaded = True if embeddings is None and pages_and_chunks is None: with st.spinner('Processing PDF...'): - with tempfile.NamedTemporaryFile(delete=False) as tmp_file: - tmp_file.write(pdf.read()) - tmp_file_path = tmp_file.name pages_and_texts = open_and_read_pdf(pdf) # Extract tables from the PDF - tables = extract_tables_from_pdf(tmp_file_path) nlp = English() nlp.add_pipe("sentencizer") text_chunks=[]