thoristhor commited on
Commit
517ed4a
·
1 Parent(s): d018b4e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -24,9 +24,9 @@ from langchain.schema import (
24
 
25
 
26
  OPENAI_API_KEY=os.environ["OPENAI_API_KEY"]
27
- embedding = OpenAIEmbedding()
28
  vectorstore = Chroma(persist_directory='/vectorstore', embedding_function=embedding)
29
-
30
  aisyah_template="""
31
  Answer each question truthfully using the Malaysia's Form 1 History data provided. Your answers should be concise and straight to the point.
32
  For questions that are open-ended, which require subjective judgment or opinion, you may not find a definitive answer in the textbook.
 
24
 
25
 
26
  OPENAI_API_KEY=os.environ["OPENAI_API_KEY"]
27
+ # embedding = OpenAIEmbedding()
28
  vectorstore = Chroma(persist_directory='/vectorstore', embedding_function=embedding)
29
+ retriever = vectorstore.as_retriever()
30
  aisyah_template="""
31
  Answer each question truthfully using the Malaysia's Form 1 History data provided. Your answers should be concise and straight to the point.
32
  For questions that are open-ended, which require subjective judgment or opinion, you may not find a definitive answer in the textbook.