Update app.py
Browse files
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 |
-
|
| 84 |
-
|
| 85 |
-
|
| 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(
|
| 93 |
-
|
| 94 |
|
| 95 |
-
raw_text = get_pdf(
|
| 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)
|