JBHF commited on
Commit
6a4790d
1 Parent(s): f8522bf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -15,9 +15,9 @@ from langchain_community.embeddings import OllamaEmbeddings
15
  # JB:
16
  from langchain.embeddings import FastEmbedEmbeddings
17
 
18
- # from langchain_community.vectorstores import FAISS
19
  # from langchain.vectorstores import Chroma
20
- from langchain_community.vectorstores import Chroma
21
 
22
  from langchain.text_splitter import RecursiveCharacterTextSplitter
23
  from langchain.chains.combine_documents import create_stuff_documents_chain
@@ -45,17 +45,17 @@ if "vector" not in st.session_state:
45
  st.session_state.text_splitter = RecursiveCharacterTextSplitter(chunk_size=1000, chunk_overlap=200)
46
  st.session_state.documents = st.session_state.text_splitter.split_documents( st.session_state.docs)
47
  # st.session_state.vector = FAISS.from_documents(st.session_state.documents, st.session_state.embeddings) # ORIGINAL
 
48
  # ZIE:
49
  # ZIE VOOR EEN APP MET CHROMADB:
50
  # https://github.com/vndee/local-rag-example/blob/main/rag.py
51
  # https://raw.githubusercontent.com/vndee/local-rag-example/main/rag.py
52
  # Chroma.from_documents(documents=chunks, embedding=FastEmbedEmbeddings())
53
- st.session_state.vector = Chroma.from_documents(st.session_state.documents, st.session_state.embeddings) # JB
54
 
55
 
56
  # st.title("Chat with Docs - Groq Edition :) ")
57
- st.title("Literature Based Research (LBR) - Alexander Unzicker and Jan Bours - Chat with Docs - Groq Edition (Very Fast!) ")
58
-
59
 
60
  llm = ChatGroq(
61
  groq_api_key=groq_api_key,
 
15
  # JB:
16
  from langchain.embeddings import FastEmbedEmbeddings
17
 
18
+ from langchain_community.vectorstores import FAISS
19
  # from langchain.vectorstores import Chroma
20
+ # from langchain_community.vectorstores import Chroma
21
 
22
  from langchain.text_splitter import RecursiveCharacterTextSplitter
23
  from langchain.chains.combine_documents import create_stuff_documents_chain
 
45
  st.session_state.text_splitter = RecursiveCharacterTextSplitter(chunk_size=1000, chunk_overlap=200)
46
  st.session_state.documents = st.session_state.text_splitter.split_documents( st.session_state.docs)
47
  # st.session_state.vector = FAISS.from_documents(st.session_state.documents, st.session_state.embeddings) # ORIGINAL
48
+ st.session_state.vector = FAISS.from_documents(st.session_state.documents, st.session_state.embeddings) # ORIGINAL
49
  # ZIE:
50
  # ZIE VOOR EEN APP MET CHROMADB:
51
  # https://github.com/vndee/local-rag-example/blob/main/rag.py
52
  # https://raw.githubusercontent.com/vndee/local-rag-example/main/rag.py
53
  # Chroma.from_documents(documents=chunks, embedding=FastEmbedEmbeddings())
54
+ # st.session_state.vector = Chroma.from_documents(st.session_state.documents, st.session_state.embeddings) # JB
55
 
56
 
57
  # st.title("Chat with Docs - Groq Edition :) ")
58
+ st.title("Literature Based Research (LBR) - Alexander Unzicker and Jan Bours - Chat with Docs - Groq Edition (Very Fast!) - 2")
 
59
 
60
  llm = ChatGroq(
61
  groq_api_key=groq_api_key,