main
HuangHai 2 weeks ago
parent 4576ffc59e
commit 906ee2d0ef

@ -29,5 +29,5 @@ completion = client.chat.completions.create(
ocr_text = completion.choices[0].message.content
# 二、调用格式化函数处理内容
format_exam_content(raw_text=ocr_text, output_path="./output/数学OCR整理后的结果.md")
format_exam_content(raw_text=ocr_text, output_path="../output/数学OCR整理后的结果.md")
print("保存成功!")

@ -1,12 +1,13 @@
import asyncio
import os
from Util.DocxUtil import get_docx_content_by_pandoc
async def main():
# 要处理的文件路径
file_path = "ShiTi/Docx/《动能定理》巩固练习.docx"
file_path = "Docx/《动能定理》巩固练习.docx"
# 转换docx为md
get_docx_content_by_pandoc(file_path, 'Word转试题.md')
get_docx_content_by_pandoc(file_path, '../Word转试题.md')
if __name__ == "__main__":
asyncio.run(main())
Loading…
Cancel
Save