Mbonea commited on
Commit
fe53703
·
1 Parent(s): 786acf5
Files changed (2) hide show
  1. App/Embedding/utils/Initialize.py +2 -1
  2. App/app.py +1 -1
App/Embedding/utils/Initialize.py CHANGED
@@ -62,5 +62,6 @@ def search(query: str, task_id: str):
62
 
63
 
64
  def encode(temp: list[Document]):
65
- docsearch.add_documents(temp)
 
66
  # return embeddings.embed_documents(texts = [d.page_content for d in temp])
 
62
 
63
 
64
  def encode(temp: list[Document]):
65
+ for doc in temp:
66
+ docsearch.add_documents([doc])
67
  # return embeddings.embed_documents(texts = [d.page_content for d in temp])
App/app.py CHANGED
@@ -48,7 +48,7 @@ def authjwt_exception_handler(request: Request, exc: AuthJWTException):
48
 
49
  @app.on_event("startup")
50
  async def startup_event():
51
- # await bot.start()
52
  # await upload_bot.start()
53
  # await models.create_all()
54
  # models.metadata.create_all()
 
48
 
49
  @app.on_event("startup")
50
  async def startup_event():
51
+ await bot.start()
52
  # await upload_bot.start()
53
  # await models.create_all()
54
  # models.metadata.create_all()