Skip to content

Commit

Permalink
force disable_python_run=True
Browse files Browse the repository at this point in the history
  • Loading branch information
CosmosShadow committed Jul 24, 2024
1 parent dd871cc commit cfde613
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gptpdf/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def _gpt_parse_images(

def _process_page(index: int, image_info: Tuple[str, List[str]]) -> Tuple[int, str]:
logging.info(f'gpt parse page: {index}')
agent = Agent(role=role_prompt, api_key=api_key, base_url=base_url, model=model, **args)
agent = Agent(role=role_prompt, api_key=api_key, base_url=base_url, disable_python_run=True, model=model, **args)
page_image, rect_images = image_info
local_prompt = prompt
if rect_images:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "gptpdf"
version = "0.0.14"
version = "0.0.15"
description = "Using GPT to parse PDF"
authors = ["Chen Li <lichenarthurdata@gmail.com>"]
license = "Apache 2.0"
Expand Down
4 changes: 2 additions & 2 deletions test/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,6 @@ def test_qwen_vl_max():

if __name__ == '__main__':
# test_use_api_key()
# test_use_env()
test_use_env()
# test_azure()
test_qwen_vl_max()
# test_qwen_vl_max()

0 comments on commit cfde613

Please sign in to comment.