yashasgupta commited on
Commit
8f74b08
1 Parent(s): bd8a766

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -44,11 +44,10 @@ from langchain_text_splitters import NLTKTextSplitter
44
 
45
  uploaded_file = st.file_uploader("Choose a pdf file",type = "pdf")
46
 
47
- if uploaded_file is not None:
48
- pdf_loader = PDFMinerLoader(uploaded_file)
49
- dat_nik = pdf_loader.load()
50
- text_splitter = NLTKTextSplitter(chunk_size = 500,chunk_overlap = 100)
51
- chunks = test_splitter.split_documents(dat_nik)
52
 
53
  # dat = PDFMinerLoader("2404.07143.pdf")
54
  # dat_nik =dat.load()
 
44
 
45
  uploaded_file = st.file_uploader("Choose a pdf file",type = "pdf")
46
 
47
+ pdf_loader = PDFMinerLoader(uploaded_file)
48
+ dat_nik = pdf_loader.load()
49
+ text_splitter = NLTKTextSplitter(chunk_size = 500,chunk_overlap = 100)
50
+ chunks = test_splitter.split_documents(dat_nik)
 
51
 
52
  # dat = PDFMinerLoader("2404.07143.pdf")
53
  # dat_nik =dat.load()