-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.py
More file actions
22 lines (18 loc) · 729 Bytes
/
run.py
File metadata and controls
22 lines (18 loc) · 729 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import sys
from pidmini.steps import step1_text_classifier, step2_add_extracted, step3_final_output
def main():
if len(sys.argv) != 4:
print("Usage: python run.py <PDF_PATH> <REFERENCE_TEXT> <REFERENCE_PAGE>")
sys.exit(1)
pdf_path, ref_text, ref_page_str = sys.argv[1], sys.argv[2], sys.argv[3]
try:
ref_page = int(ref_page_str)
except ValueError:
print("[오류] REFERENCE_PAGE는 숫자여야 합니다."); sys.exit(1)
out1 = step1_text_classifier()
out2 = step2_add_extracted(pdf_path, ref_text, ref_page, out1)
out3 = step3_final_output(out2)
print("\n=== 파이프라인 완료 ===")
print("최종 파일:", out3)
if __name__ == "__main__":
main()