Vaibhav84 commited on
Commit
fe7685d
·
1 Parent(s): a3cdaed
Files changed (1) hide show
  1. app.py +14 -1
app.py CHANGED
@@ -125,4 +125,17 @@ def process_pdf_file(file: bytes = File(...)):
125
  text += page.extract_text()
126
  print(text)
127
  # Process saved file
128
- return {"content": file.filename}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
125
  text += page.extract_text()
126
  print(text)
127
  # Process saved file
128
+ return {"content": text}
129
+
130
+
131
+ @app.post("/uploadJobDescriptionPDF3/")
132
+ def process_pdf_file2(file: Annotated[bytes, File()]):
133
+ # Save file locally for processing
134
+ text =''
135
+ reserve_pdf_on_memory = io.BytesIO(file)
136
+ load_pdf = PyPDF2.PdfReader(reserve_pdf_on_memory)
137
+ for page in load_pdf.pages:
138
+ text += page.extract_text()
139
+ print(text)
140
+ # Process saved file
141
+ return {"content": text}