QuaidKhalid commited on
Commit
99c3c54
·
verified ·
1 Parent(s): 03ab1c9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -7,9 +7,7 @@ from langchain_core.runnables import RunnablePassthrough
7
  from langchain_text_splitters import RecursiveCharacterTextSplitter
8
  from sentence_transformers import SentenceTransformer
9
  import torch
10
- import PyPDF2
11
 
12
- # ... rest of the code remains the same ...
13
 
14
  # Define the embedding class
15
  class SentenceTransformerEmbedding:
@@ -55,7 +53,7 @@ def initialize_chroma(splits):
55
  rag_chain = (
56
  {"context": retriever | format_docs, "question": RunnablePassthrough()}
57
  | prompt
58
- | llm # Replace `llm` with an appropriate language model
59
  | StrOutputParser()
60
  )
61
  return rag_chain
 
7
  from langchain_text_splitters import RecursiveCharacterTextSplitter
8
  from sentence_transformers import SentenceTransformer
9
  import torch
 
10
 
 
11
 
12
  # Define the embedding class
13
  class SentenceTransformerEmbedding:
 
53
  rag_chain = (
54
  {"context": retriever | format_docs, "question": RunnablePassthrough()}
55
  | prompt
56
+ | llm
57
  | StrOutputParser()
58
  )
59
  return rag_chain