Spaces:
Sleeping
Sleeping
Commit
·
a64ef48
1
Parent(s):
d400d41
Update Chat_with_pdf_LLM.py
Browse files- Chat_with_pdf_LLM.py +2 -1
Chat_with_pdf_LLM.py
CHANGED
@@ -13,13 +13,14 @@ def LLM_pdf(model_name = 'google/flan-t5-large'):
|
|
13 |
|
14 |
# upload file
|
15 |
pdf = st.file_uploader("Upload your PDF", type="pdf")
|
16 |
-
|
17 |
# extract the text
|
18 |
if pdf is not None:
|
19 |
pdf_reader = PdfReader(pdf)
|
20 |
text = ""
|
21 |
for page in pdf_reader.pages:
|
22 |
text += page.extract_text()
|
|
|
23 |
|
24 |
# split into chunks
|
25 |
text_splitter = CharacterTextSplitter(
|
|
|
13 |
|
14 |
# upload file
|
15 |
pdf = st.file_uploader("Upload your PDF", type="pdf")
|
16 |
+
print(pdf)
|
17 |
# extract the text
|
18 |
if pdf is not None:
|
19 |
pdf_reader = PdfReader(pdf)
|
20 |
text = ""
|
21 |
for page in pdf_reader.pages:
|
22 |
text += page.extract_text()
|
23 |
+
print(pdf_reader)
|
24 |
|
25 |
# split into chunks
|
26 |
text_splitter = CharacterTextSplitter(
|