Spaces:
Sleeping
Sleeping
Chandranshu Jain
commited on
Commit
•
b9e3f13
1
Parent(s):
6dd4f19
Update app.py
Browse files
app.py
CHANGED
@@ -10,6 +10,7 @@ from langchain.prompts import PromptTemplate
|
|
10 |
from langchain_community.document_loaders import PyPDFLoader
|
11 |
from langchain_chroma import Chroma
|
12 |
import tempfile
|
|
|
13 |
|
14 |
st.set_page_config(page_title="Document Genie", layout="wide")
|
15 |
|
@@ -68,7 +69,8 @@ def get_conversational_chain():
|
|
68 |
return chain
|
69 |
|
70 |
def embedding(chunk,query):
|
71 |
-
embeddings = GoogleGenerativeAIEmbeddings(model="models/embedding-001")
|
|
|
72 |
db = Chroma.from_documents(chunk,embeddings)
|
73 |
doc = db.similarity_search(query)
|
74 |
print(doc)
|
|
|
10 |
from langchain_community.document_loaders import PyPDFLoader
|
11 |
from langchain_chroma import Chroma
|
12 |
import tempfile
|
13 |
+
from langchain_cohere import CohereEmbeddings
|
14 |
|
15 |
st.set_page_config(page_title="Document Genie", layout="wide")
|
16 |
|
|
|
69 |
return chain
|
70 |
|
71 |
def embedding(chunk,query):
|
72 |
+
#embeddings = GoogleGenerativeAIEmbeddings(model="models/embedding-001")
|
73 |
+
embeddings = CohereEmbeddings(model="embed-english-v3.0")
|
74 |
db = Chroma.from_documents(chunk,embeddings)
|
75 |
doc = db.similarity_search(query)
|
76 |
print(doc)
|