Mpavan45 commited on
Commit
5d38c21
·
verified ·
1 Parent(s): 8b027cb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -8
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
- if GOOGLE_API_KEY:
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([