Spaces:
Sleeping
Sleeping
Commit
·
c320a1b
1
Parent(s):
a8fe220
update mineru
Browse files- src/demo/asg_loader.py +2 -2
src/demo/asg_loader.py
CHANGED
@@ -17,7 +17,7 @@ class DocumentLoading:
|
|
17 |
print(f"Markdown file for {pdf_file} already exists at {md_file_path}. Skipping conversion.", flush=True)
|
18 |
return
|
19 |
|
20 |
-
command = ["
|
21 |
try:
|
22 |
subprocess.run(command, check=True)
|
23 |
# 检查是否生成了 Markdown 文件
|
@@ -43,7 +43,7 @@ class DocumentLoading:
|
|
43 |
if os.path.exists(target_dir):
|
44 |
print(f"Folder for {pdf_file} already exists in {output_dir}. Skipping conversion.")
|
45 |
else:
|
46 |
-
command = ["
|
47 |
try:
|
48 |
subprocess.run(command, check=True)
|
49 |
print(f"Successfully converted {pdf_file} to markdown format in {target_dir}.")
|
|
|
17 |
print(f"Markdown file for {pdf_file} already exists at {md_file_path}. Skipping conversion.", flush=True)
|
18 |
return
|
19 |
|
20 |
+
command = ["mineru", "-p", pdf_file, "-o", output_dir, "-m", method]
|
21 |
try:
|
22 |
subprocess.run(command, check=True)
|
23 |
# 检查是否生成了 Markdown 文件
|
|
|
43 |
if os.path.exists(target_dir):
|
44 |
print(f"Folder for {pdf_file} already exists in {output_dir}. Skipping conversion.")
|
45 |
else:
|
46 |
+
command = ["mineru", "-p", pdf_file, "-o", output_dir, "-m", method]
|
47 |
try:
|
48 |
subprocess.run(command, check=True)
|
49 |
print(f"Successfully converted {pdf_file} to markdown format in {target_dir}.")
|