Changes
Browse files
app.py
CHANGED
@@ -120,6 +120,8 @@ def process_pdf_file(file: bytes = File(...)):
|
|
120 |
# Save file locally for processing
|
121 |
|
122 |
reserve_pdf_on_memory = io.BytesIO(file)
|
123 |
-
load_pdf = PyPDF2.
|
|
|
|
|
124 |
# Process saved file
|
125 |
-
return {"content":
|
|
|
120 |
# Save file locally for processing
|
121 |
|
122 |
reserve_pdf_on_memory = io.BytesIO(file)
|
123 |
+
load_pdf = PyPDF2.PdfReader(reserve_pdf_on_memory)
|
124 |
+
data = load_pdf.getPage(0).extractText()
|
125 |
+
print(data)
|
126 |
# Process saved file
|
127 |
+
return {"content": data}
|