gkrishnan commited on
Commit
8f228b9
1 Parent(s): e5f344c

Update shakespeare.pkl

Browse files
Files changed (1) hide show
  1. shakespeare.pkl +12 -0
shakespeare.pkl CHANGED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from langchain.document_loaders import BSHTMLLoader, DirectoryLoader
2
+
3
+ bshtml_dir_loader = DirectoryLoader('./data/', loader_cls = BSHTMLLoader)
4
+
5
+ data = bshtml_dir_loader.load()
6
+
7
+ import pickle
8
+ with open("shakespeare.pkl", "wb") as fp:
9
+ pickle.dump(data, fp)
10
+
11
+ with open('shakespeare.pkl', 'rb') as fp:
12
+ data = pickle.load(fp)