Transforms complex documents like PDFs and Office docs into LLM-ready markdown/JSON for your Agentic workflows.
Python ai4sciencedocument-analysisdocxextract-datalayout-analysisocrparserpdfpdf-converterpdf-extractor-llmpdf-extractor-pretrainpdf-extractor-ragpdf-parserpptxpythonxlsx
update api path and documents
JesseChen10312bdb54455370
diff --git a/projects/web_api/app.py b/projects/web_api/app.pyindex fea9d3a9..5a67bdf7 100644--- a/projects/web_api/app.py+++ b/projects/web_api/app.py@@ -64,14 +64,13 @@ def init_writers(Initialize writers based on path typeArgs:- pdf_path: PDF file path (local path or S3 path)- pdf_file: Uploaded PDF file object+ file_path: file path (local path or S3 path)+ file: Uploaded file objectoutput_path: Output directory pathoutput_image_path: Image output directory pathReturns:- Tuple[writer, image_writer, pdf_bytes]: Returns initialized writer tuple and PDF- file content+ Tuple[writer, image_writer, file_bytes]: Returns initialized writer tuple and file content"""file_extension:str = Noneif file_path:@@ -120,7 +119,8 @@ def process_file(Process PDF file contentArgs:- pdf_bytes: Binary content of PDF file+ file_bytes: Binary content of file+ file_extension: file extensionparse_method: Parse method ('ocr', 'txt', 'auto')image_writer: Image writer@@ -170,9 +170,9 @@ def encode_image(image_path: str) -> str:@app.post(- "/pdf_parse",+ "/file_parse",tags=["projects"],- summary="Parse PDF files (supports local files and S3)",+ summary="Parse files (supports local files and S3)",)async def file_parse(file: UploadFile = None,@@ -190,10 +190,10 @@ async def file_parse(to the specified directory.Args:- pdf_file: The PDF file to be parsed. Must not be specified together with- `pdf_path`- pdf_path: The path to the PDF file to be parsed. Must not be specified together- with `pdf_file`+ file: The PDF file to be parsed. Must not be specified together with+ `file_path`+ file_path: The path to the PDF file to be parsed. Must not be specified together+ with `file`parse_method: Parsing method, can be auto, ocr, or txt. Default is auto. Ifresults are not satisfactory, try ocris_json_md_dump: Whether to write parsed data to .json and .md files. Default