Unverified Commit 6c1cd7fd authored by myhloli's avatar myhloli Committed by GitHub

Merge pull request #80 from myhloli/master

fix UNIPipe cli
parents eb6bb931 0a72b97d
...@@ -60,7 +60,11 @@ def prepare_env(pdf_file_name, method): ...@@ -60,7 +60,11 @@ def prepare_env(pdf_file_name, method):
def _do_parse(pdf_file_name, pdf_bytes, model_list, parse_method, image_writer, md_writer, image_dir, local_md_dir): def _do_parse(pdf_file_name, pdf_bytes, model_list, parse_method, image_writer, md_writer, image_dir, local_md_dir):
if parse_method == "auto": if parse_method == "auto":
pipe = UNIPipe(pdf_bytes, model_list, image_writer, is_debug=True) jso_useful_key = {
"_pdf_type": "",
"model_list": model_list
}
pipe = UNIPipe(pdf_bytes, jso_useful_key, image_writer, is_debug=True)
elif parse_method == "txt": elif parse_method == "txt":
pipe = TXTPipe(pdf_bytes, model_list, image_writer, is_debug=True) pipe = TXTPipe(pdf_bytes, model_list, image_writer, is_debug=True)
elif parse_method == "ocr": elif parse_method == "ocr":
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment