Vaibhav84 commited on
Commit
aaa62d0
·
1 Parent(s): ba60b2c
Files changed (1) hide show
  1. app.py +4 -2
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.PdfFileReader(reserve_pdf_on_memory)
 
 
124
  # Process saved file
125
- return {"content": load_pdf}
 
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}