m96tkmok commited on
Commit
afe66c1
·
verified ·
1 Parent(s): 37b51d7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -7
app.py CHANGED
@@ -80,19 +80,18 @@ def main() -> None:
80
  st.write("The LLM model unsloth/Llama-3.2-3B-Instruct is used")
81
  st.write("You can upload a PDF to chat with !!!")
82
 
83
- ## Ken 12/11/2024 Temp Comment out
84
- #with st.sidebar:
85
- # st.title("PDF FILE UPLOAD:")
86
- # docs = st.file_uploader("Upload your PDF File and Click on the Submit & Process Button", accept_multiple_files=False, key="pdf_uploader")
87
 
88
  text_splitter = RecursiveCharacterTextSplitter(chunk_size=1000, chunk_overlap=100)
89
 
90
  ### Ken 12/11/2024 START
91
 
92
- loader = PyPDFLoader(temp_file)
93
- docs = loader.load()
94
 
95
- raw_text = get_pdf(docs)
96
  ### Ken 12/11/2024 END
97
 
98
  #chunks = text_splitter.split_documents(docs)
 
80
  st.write("The LLM model unsloth/Llama-3.2-3B-Instruct is used")
81
  st.write("You can upload a PDF to chat with !!!")
82
 
83
+ with st.sidebar:
84
+ st.title("PDF FILE UPLOAD:")
85
+ docs = st.file_uploader("Upload your PDF File and Click on the Submit & Process Button", accept_multiple_files=False, key="pdf_uploader")
 
86
 
87
  text_splitter = RecursiveCharacterTextSplitter(chunk_size=1000, chunk_overlap=100)
88
 
89
  ### Ken 12/11/2024 START
90
 
91
+ loader = PyPDFLoader(docs)
92
+ ldocs = loader.load()
93
 
94
+ raw_text = get_pdf(ldocs)
95
  ### Ken 12/11/2024 END
96
 
97
  #chunks = text_splitter.split_documents(docs)