1234567891011121314151617181920212223242526272829 |
- import requests
- # -*- coding: utf-8 -*-
- async def book_extract(book_path, book_id):
- with open(book_path, "rb") as f:
- files = {"files": (book_id, f, "application/pdf")}
- response = requests.post(
- "http://192.168.100.31:8003/file_parse",
- headers={"accept": "application/json"},
- data={
- "return_model_output": "false",
- "return_md": "false",
- "return_images": "false",
- "end_page_id": "99999",
- "parse_method": "auto",
- "start_page_id": "0",
- "lang_list": "ch",
- "output_dir": "./output",
- "server_url": "string",
- "return_content_list": "true",
- "backend": "pipeline",
- "table_enable": "true",
- "response_format_zip": "false",
- "formula_enable": "true",
- },
- files=files,
- )
- return response.json()
|