Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -53,7 +53,7 @@ def get_conversational_chain():
|
|
| 53 |
"""
|
| 54 |
|
| 55 |
model = ChatGoogleGenerativeAI(model="gemini-pro",
|
| 56 |
-
temperature=0.3)
|
| 57 |
|
| 58 |
prompt = PromptTemplate(template = prompt_template, input_variables = ["context", "question"])
|
| 59 |
chain = load_qa_chain(model, chain_type="stuff", prompt=prompt)
|
|
@@ -63,7 +63,7 @@ def get_conversational_chain():
|
|
| 63 |
|
| 64 |
|
| 65 |
def user_input(user_question):
|
| 66 |
-
embeddings = GoogleGenerativeAIEmbeddings(model = "models/embedding-001")
|
| 67 |
|
| 68 |
new_db = FAISS.load_local("faiss_index", embeddings)
|
| 69 |
docs = new_db.similarity_search(user_question)
|
|
|
|
| 53 |
"""
|
| 54 |
|
| 55 |
model = ChatGoogleGenerativeAI(model="gemini-pro",
|
| 56 |
+
temperature=0.3, google_api_key='AIzaSyAZ6yZYDu8cbdpm1_4XmvWLQIy7PkUR5-M')
|
| 57 |
|
| 58 |
prompt = PromptTemplate(template = prompt_template, input_variables = ["context", "question"])
|
| 59 |
chain = load_qa_chain(model, chain_type="stuff", prompt=prompt)
|
|
|
|
| 63 |
|
| 64 |
|
| 65 |
def user_input(user_question):
|
| 66 |
+
embeddings = GoogleGenerativeAIEmbeddings(model = "models/embedding-001", google_api_key='AIzaSyAZ6yZYDu8cbdpm1_4XmvWLQIy7PkUR5-M')
|
| 67 |
|
| 68 |
new_db = FAISS.load_local("faiss_index", embeddings)
|
| 69 |
docs = new_db.similarity_search(user_question)
|