mlara commited on
Commit
65e34bb
1 Parent(s): d46cc4d

second commit

Browse files
Files changed (2) hide show
  1. roaringkitty.py +3 -1
  2. talking_app.py +1 -1
roaringkitty.py CHANGED
@@ -10,7 +10,7 @@ from langchain.text_splitter import RecursiveCharacterTextSplitter
10
 
11
  text_splitter = RecursiveCharacterTextSplitter(chunk_size=1000, chunk_overlap=100)
12
 
13
- async def roaringkiity_chain():
14
  # build FAISS index from csv
15
  loader = CSVLoader(file_path="./data/roaringkitty.csv", source_column="Link")
16
  data = loader.load()
@@ -30,3 +30,5 @@ async def roaringkiity_chain():
30
  retriever=docsearch.as_retriever(),
31
  chain_type_kwargs = {"prompt": prompt}
32
  )
 
 
 
10
 
11
  text_splitter = RecursiveCharacterTextSplitter(chunk_size=1000, chunk_overlap=100)
12
 
13
+ async def roaringkiity_chain(prompt: str):
14
  # build FAISS index from csv
15
  loader = CSVLoader(file_path="./data/roaringkitty.csv", source_column="Link")
16
  data = loader.load()
 
30
  retriever=docsearch.as_retriever(),
31
  chain_type_kwargs = {"prompt": prompt}
32
  )
33
+
34
+ return chain
talking_app.py CHANGED
@@ -52,7 +52,7 @@ async def init():
52
  msg = cl.Message(content=f"Building Index...")
53
  await msg.send()
54
 
55
- chain = await roaringkiity_chain()
56
 
57
  msg.content = f"Index built!"
58
  await msg.send()
 
52
  msg = cl.Message(content=f"Building Index...")
53
  await msg.send()
54
 
55
+ chain = await roaringkiity_chain(prompt)
56
 
57
  msg.content = f"Index built!"
58
  await msg.send()