fifteen
Browse files
app.py
CHANGED
@@ -79,10 +79,11 @@ def generate(image, pdfs, temperature=0.9, max_new_tokens=1500, top_p=0.95, repe
|
|
79 |
# load uploaded pdf file
|
80 |
documents = []
|
81 |
for pdf in pdfs:
|
82 |
-
loader = PyPDFLoader(pdf.name)
|
|
|
83 |
# PyPDFLoader() will read and extract text content form a PDF
|
84 |
-
print(pdf)
|
85 |
-
print(pdf.name)
|
86 |
documents.extend(loader.load())
|
87 |
# loader.load() will return a list of document objects, and then documents.extend() will add all these returned objects to documents = [].
|
88 |
|
|
|
79 |
# load uploaded pdf file
|
80 |
documents = []
|
81 |
for pdf in pdfs:
|
82 |
+
#loader = PyPDFLoader(pdf.name)
|
83 |
+
loader = PyPDFLoader(pdf)
|
84 |
# PyPDFLoader() will read and extract text content form a PDF
|
85 |
+
print(pdf) # /tmp/gradio/31ecc15809f1639fb96bebad2eac3dfe41eb5fce/After-Twenty-Years.pdf
|
86 |
+
print(pdf.name) # /tmp/gradio/31ecc15809f1639fb96bebad2eac3dfe41eb5fce/After-Twenty-Years.pdf
|
87 |
documents.extend(loader.load())
|
88 |
# loader.load() will return a list of document objects, and then documents.extend() will add all these returned objects to documents = [].
|
89 |
|