samim2024 commited on
Commit
bdef614
·
verified ·
1 Parent(s): e1d808e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -52,8 +52,8 @@ def create_langchain_index(input_text):
52
  print("--indexing---")
53
  get_text(input_text)
54
  loader = TextLoader("text\\temp.txt", encoding='utf-8')
55
- # data = loader.load()
56
- embeddings = model.encode(loader)
57
  index = VectorstoreIndexCreator(vectorstore_cls=DocArrayInMemorySearch,embedding=embeddings).from_loaders([loader])
58
  return index
59
 
 
52
  print("--indexing---")
53
  get_text(input_text)
54
  loader = TextLoader("text\\temp.txt", encoding='utf-8')
55
+ data = loader.load()
56
+ embeddings = model.encode(data)
57
  index = VectorstoreIndexCreator(vectorstore_cls=DocArrayInMemorySearch,embedding=embeddings).from_loaders([loader])
58
  return index
59