Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -38,14 +38,9 @@ embedding = GoogleGenerativeAIEmbeddings(model="models/embedding-001", google_ap
|
|
| 38 |
vectorstore = Chroma(persist_directory='chroma_db', embedding_function=embedding)
|
| 39 |
|
| 40 |
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
vectorstore = initialize_vectorstore(GOOGLE_API_KEY)
|
| 45 |
-
if vectorstore:
|
| 46 |
-
retriever = vectorstore.as_retriever(search_type="mmr", search_kwargs={"k": 3, "lambda_mult": 1})
|
| 47 |
-
llm = ChatGoogleGenerativeAI(api_key=GOOGLE_API_KEY, model="gemini-1.5-flash", temperature=1)
|
| 48 |
-
parser = StrOutputParser()
|
| 49 |
|
| 50 |
# Prompt template
|
| 51 |
prompt = ChatPromptTemplate.from_messages([
|
|
|
|
| 38 |
vectorstore = Chroma(persist_directory='chroma_db', embedding_function=embedding)
|
| 39 |
|
| 40 |
|
| 41 |
+
retriever = vectorstore.as_retriever(search_type="mmr", search_kwargs={"k": 3, "lambda_mult": 1})
|
| 42 |
+
llm = ChatGoogleGenerativeAI(api_key=GOOGLE_API_KEY, model="gemini-1.5-flash", temperature=1)
|
| 43 |
+
parser = StrOutputParser()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
|
| 45 |
# Prompt template
|
| 46 |
prompt = ChatPromptTemplate.from_messages([
|