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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -53,6 +53,7 @@ def create_langchain_index(input_text):
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
 
53
  get_text(input_text)
54
  loader = TextLoader("text\\temp.txt", encoding='utf-8')
55
  data = loader.load()
56
+ data = str(data)
57
  embeddings = model.encode(data)
58
  index = VectorstoreIndexCreator(vectorstore_cls=DocArrayInMemorySearch,embedding=embeddings).from_loaders([loader])
59
  return index