Galatea007 commited on
Commit
63e46a7
1 Parent(s): 44c6810

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -88,7 +88,7 @@ async def main():
88
  pbars = []
89
 
90
  for i, batch in enumerate(batches):
91
- pbar = tqdm(total=len(batch), desc=f"Batch {i+1}/{len(batches)}", position=i)
92
  pbars.append(pbar)
93
 
94
  if i == 0:
@@ -177,11 +177,10 @@ async def start_chat():
177
 
178
  ### BUILD LCEL RAG CHAIN THAT ONLY RETURNS TEXT
179
 
 
 
 
180
 
181
- lcel_rag_chain = (
182
- {"context": itemgetter("query") | hf_retriever, "query": itemgetter("query")}
183
- | rag_prompt | hf_llm
184
- )
185
 
186
  cl.user_session.set("lcel_rag_chain", lcel_rag_chain)
187
 
 
88
  pbars = []
89
 
90
  for i, batch in enumerate(batches):
91
+ pbar = tqdm(total=len(batch), desc=f"Batch {i+1}/{len(batches)}")
92
  pbars.append(pbar)
93
 
94
  if i == 0:
 
177
 
178
  ### BUILD LCEL RAG CHAIN THAT ONLY RETURNS TEXT
179
 
180
+ lcel_rag_chain = (
181
+ {"context": RunnablePassthrough() | hf_retriever, "query": itemgetter("query")}
182
+ | rag_prompt | hf_llm)
183
 
 
 
 
 
184
 
185
  cl.user_session.set("lcel_rag_chain", lcel_rag_chain)
186