main
HuangHai 3 weeks ago
parent e9ff859185
commit 539e253546

@ -244,6 +244,8 @@
<button id="submitBtn" onclick="submitQuestion()"><span class="icon">💡</span>提问</button>
<button id="clearBtn" onclick="clearAll()"><span class="icon">🗑️</span>清空</button>
<img src="https://dsideal.obs.cn-north-1.myhuaweicloud.com/HuangHai/BlogImages/%7Byear%7D/%7Bmonth%7D/%7Bmd5%7D.%7BextName%7D/20250705112607260.png" width="500px" height="400px" />
</div>
</div>

@ -1,12 +1,8 @@
import sys
from pathlib import Path
from raganything import RAGAnything
def test_office_document_parsing(file_path: str):
def office_document_parsing(file_path: str):
supported_extensions = {".doc", ".docx", ".ppt", ".pptx", ".xls", ".xlsx"}
if file_path.suffix.lower() not in supported_extensions:
print(f"❌ Unsupported file format: {file_path.suffix}")
@ -19,7 +15,6 @@ def test_office_document_parsing(file_path: str):
rag = RAGAnything()
try:
# Test document parsing with MinerU
print("\n🔄 Testing document parsing with MinerU...")
content_list, md_content = rag.parse_document(
file_path=str(file_path),
@ -105,7 +100,7 @@ def test_office_document_parsing(file_path: str):
def main():
file=r"D:\dsWork\dsProject\dsRagAnything\Txt\小学数学教学中的若干问题_MATH_1.docx"
test_office_document_parsing(file)
office_document_parsing(file)
if __name__ == "__main__":
sys.exit(main())
Loading…
Cancel
Save