eaglelandsonce commited on
Commit
a166c06
·
verified ·
1 Parent(s): 6bb40f5

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -0
app.py ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ from langchain.document_loaders import TextLoader
2
+ from langchain.text_splitter import CharacterTextSplitter
3
+ from langchain.vectorstores import Clarifai
4
+
5
+ loader = TextLoader("state_of_the_union.txt")
6
+ documents = loader.load()
7
+ text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)
8
+ docs = text_splitter.split_documents(documents)
9
+