Removed Google dependency from user input
Browse files
app.py
CHANGED
|
@@ -38,8 +38,6 @@ def get_text_chunks(text):
|
|
| 38 |
|
| 39 |
# Converting into Vector data/store (can also be stored)
|
| 40 |
def get_vector_store(text_chunks):
|
| 41 |
-
# embeddings = GoogleGenerativeAIEmbeddings(model='embedding-gecko-001')
|
| 42 |
-
# embeddings = GoogleGenerativeAIEmbeddings(model='models/embedding-001')
|
| 43 |
embeddings = HuggingFaceEmbeddings(model_name="sentence-transformers/all-MiniLM-L6-v2")
|
| 44 |
vector_store = FAISS.from_texts(texts=text_chunks, embedding=embeddings)
|
| 45 |
vector_store.save_local("faiss_index")
|
|
@@ -69,7 +67,7 @@ def get_conversation_chain():
|
|
| 69 |
|
| 70 |
def user_input(user_question):
|
| 71 |
# embeddings = GoogleGenerativeAIEmbeddings(model='embedding-gecko-001')
|
| 72 |
-
embeddings =
|
| 73 |
|
| 74 |
# Loading the embeddings
|
| 75 |
new_db = FAISS.load_local("faiss_index", embeddings, allow_dangerous_deserialization=True)
|
|
|
|
| 38 |
|
| 39 |
# Converting into Vector data/store (can also be stored)
|
| 40 |
def get_vector_store(text_chunks):
|
|
|
|
|
|
|
| 41 |
embeddings = HuggingFaceEmbeddings(model_name="sentence-transformers/all-MiniLM-L6-v2")
|
| 42 |
vector_store = FAISS.from_texts(texts=text_chunks, embedding=embeddings)
|
| 43 |
vector_store.save_local("faiss_index")
|
|
|
|
| 67 |
|
| 68 |
def user_input(user_question):
|
| 69 |
# embeddings = GoogleGenerativeAIEmbeddings(model='embedding-gecko-001')
|
| 70 |
+
embeddings = HuggingFaceEmbeddings(model_name="sentence-transformers/all-MiniLM-L6-v2")
|
| 71 |
|
| 72 |
# Loading the embeddings
|
| 73 |
new_db = FAISS.load_local("faiss_index", embeddings, allow_dangerous_deserialization=True)
|