Spaces:
Runtime error
Runtime error
Commit ·
45f117d
1
Parent(s): 517ed4a
Update app.py
Browse files
app.py
CHANGED
|
@@ -21,11 +21,9 @@ from langchain.schema import (
|
|
| 21 |
HumanMessage,
|
| 22 |
SystemMessage
|
| 23 |
)
|
| 24 |
-
|
| 25 |
-
|
| 26 |
OPENAI_API_KEY=os.environ["OPENAI_API_KEY"]
|
| 27 |
-
|
| 28 |
-
vectorstore = Chroma(persist_directory='
|
| 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.
|
|
|
|
| 21 |
HumanMessage,
|
| 22 |
SystemMessage
|
| 23 |
)
|
|
|
|
|
|
|
| 24 |
OPENAI_API_KEY=os.environ["OPENAI_API_KEY"]
|
| 25 |
+
embedding = OpenAIEmbeddings()
|
| 26 |
+
vectorstore = Chroma(persist_directory='vectorstore', embedding_function=embedding)
|
| 27 |
retriever = vectorstore.as_retriever()
|
| 28 |
aisyah_template="""
|
| 29 |
Answer each question truthfully using the Malaysia's Form 1 History data provided. Your answers should be concise and straight to the point.
|