Spaces:
Runtime error
Runtime error
Commit
·
f1cb8b4
1
Parent(s):
e4a98dc
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,6 +7,8 @@ from threading import Lock
|
|
| 7 |
import pinecone
|
| 8 |
from langchain.vectorstores import Chroma, Pinecone
|
| 9 |
from langchain.embeddings.openai import OpenAIEmbeddings
|
|
|
|
|
|
|
| 10 |
|
| 11 |
embeddings = OpenAIEmbeddings()
|
| 12 |
|
|
@@ -21,7 +23,9 @@ pinecone.init(
|
|
| 21 |
)
|
| 22 |
|
| 23 |
index_name = PINECONE_INDEX
|
|
|
|
| 24 |
vectorstore = Pinecone.from_existing_index(index_name=index_name, embedding=embeddings)
|
|
|
|
| 25 |
|
| 26 |
chain = get_chain(vectorstore)
|
| 27 |
|
|
|
|
| 7 |
import pinecone
|
| 8 |
from langchain.vectorstores import Chroma, Pinecone
|
| 9 |
from langchain.embeddings.openai import OpenAIEmbeddings
|
| 10 |
+
import time
|
| 11 |
+
|
| 12 |
|
| 13 |
embeddings = OpenAIEmbeddings()
|
| 14 |
|
|
|
|
| 23 |
)
|
| 24 |
|
| 25 |
index_name = PINECONE_INDEX
|
| 26 |
+
start_time = time.time()
|
| 27 |
vectorstore = Pinecone.from_existing_index(index_name=index_name, embedding=embeddings)
|
| 28 |
+
print("---vectorstore %s seconds ---" % (time.time() - start_time))
|
| 29 |
|
| 30 |
chain = get_chain(vectorstore)
|
| 31 |
|