Spaces:
Runtime error
Runtime error
Update shakespeare.pkl
Browse files- 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)
|