[全量] 初始化项目代码、配置、文档及Agent协同harness
This commit is contained in:
10
langchain-chat/tests/document_loader/test_html.py
Normal file
10
langchain-chat/tests/document_loader/test_html.py
Normal file
@@ -0,0 +1,10 @@
|
||||
data_path = './人工智能发展月报.html'
|
||||
from langchain_community.document_loaders import TextLoader
|
||||
|
||||
loader = TextLoader(data_path)
|
||||
data = loader.load()
|
||||
print(data)
|
||||
|
||||
from unstructured.partition.html import partition_html
|
||||
rst = partition_html(text=data[0].page_content)
|
||||
print("\n\n".join([str(el) for el in rst]))
|
||||
Reference in New Issue
Block a user