Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pdf-miner
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Qin Kaijie
pdf-miner
Commits
47d5ea96
Commit
47d5ea96
authored
Mar 29, 2024
by
kernel.h@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
044bd019
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
24 deletions
+1
-24
commons.py
magic_pdf/libs/commons.py
+1
-24
No files found.
magic_pdf/libs/commons.py
View file @
47d5ea96
...
@@ -24,7 +24,7 @@ error_log_path = "s3://llm-pdf-text/err_logs/"
...
@@ -24,7 +24,7 @@ error_log_path = "s3://llm-pdf-text/err_logs/"
# json_dump_path = "s3://pdf_books_temp/json_dump/" # 这条路径仅用于临时本地测试,不能提交到main
# json_dump_path = "s3://pdf_books_temp/json_dump/" # 这条路径仅用于临时本地测试,不能提交到main
json_dump_path
=
"s3://llm-pdf-text/json_dump/"
json_dump_path
=
"s3://llm-pdf-text/json_dump/"
s3_image_save_path
=
"s3://mllm-raw-media/pdf2md_img/"
s3_image_save_path
=
"s3://mllm-raw-media/pdf2md_img/"
# TODO 基础库不应该有这些存在的路径,应该在业务代码中定义
def
get_top_percent_list
(
num_list
,
percent
):
def
get_top_percent_list
(
num_list
,
percent
):
...
@@ -214,29 +214,6 @@ def get_img_s3_client(save_path:str, image_s3_config:str):
...
@@ -214,29 +214,6 @@ def get_img_s3_client(save_path:str, image_s3_config:str):
return
img_s3_client
return
img_s3_client
# def get_s3_object(path):
# src_cli_config = Config(**{
#
# "connect_timeout": 60,
# "read_timeout": 20,
# "max_pool_connections": 500,
# "s3": {
# "addressing_style": "path",
# },
# "retries": {
# "max_attempts": 3,
# }
# })
# full_path = f"{bucket_name}/{bucket_prefix}/{path}"
# try:
# src_cli = boto3.session.Session().client("s3", aws_access_key_id=ak, aws_secret_access_key=sk, endpoint_url=endpoint, region_name='', config=src_cli_config)
# res = src_cli.get_object(Bucket=bucket_name, Key=f"{bucket_prefix}/{path}")
# file_content = res["Body"].read()
# return file_content
# except Exception as e:
# logger.error(f"get_s3_object({full_path}) error: {e}")
# return b''
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
s3_path
=
"s3://llm-pdf-text/layout_det/scihub/scimag07865000-07865999/10.1007/s10729-011-9175-6.pdf/"
s3_path
=
"s3://llm-pdf-text/layout_det/scihub/scimag07865000-07865999/10.1007/s10729-011-9175-6.pdf/"
s3_profile
=
"langchao"
s3_profile
=
"langchao"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment